Without seeing your notpad format something like the following might work for you. Look closely at the file path and the worksheet code object to make sure they match.
Code:
Option Explicit
Sub OpentxtSheets()
Const sPath = "D:\Tests\" 'Change to suit
Dim sFil As String
Dim owb As Workbook
Dim sh As Worksheet
Set sh = Sheet1 'Change to suit
sFil = Dir(sPath & "*.txt") 'Note it opens txt format
Do While sFil <> ""
Set owb = Workbooks.Open(sPath & sFil)
Range("A1").CurrentRegion.Copy sh.Range("A65536").End(xlUp)(2)
owb.Close False 'Close don't save
sFil = Dir
Loop
End Sub
k thanks. i want the macro code to select the path name automatically (Differ from time to time ie C Drive, D Drive etc). So every time i have to change the path name in the code.
How is the code going to know where to pick the text files up from unless you tell it? You can put the path in a cell so it is out of vba but the code will still need to be told the path to look in.