working with .txt files in a macro
Maybe this willh help............
Sub Getfile()
'===========================================
'Offers pop-up to allow user to select file to be opened, then opens it
'===========================================
Dim FileToCheck
FileToCheck = Application.GetOpenFilename("Excel file to test (*.xls),*.xls")
If FileToCheck < False Then
On Error Resume Next
Workbooks.Open FileName:=FileToCheck
End If
End Sub
"Peggy" wrote:
I'm trying to open a file folder so I can then open a .txt file. The .txt
files will all have unique numbers against them and I cannot figure out how
to tell my macro to open the folder but let me choose the .txt file I need to
open.
|