Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Excel 2003. I have a workbook that runs a macro to search through
all files in a folder for specific text, and extract that text into the worksheet. I need to create another macro where just a single file can be selected then extract the data from the one file only. I tried to modify the VBA, but run into an error code 'Object Required'. What I attempted to do was: Sub GetSingleFile() DestSht = "sheet1" With ThisWorkbook.Sheets(DestSht) SearchData = .Range("A1").Text End With Dim fd As FileDialog Set fd = Application.GetOpenFilename Dim vrtSelectedItem As Variant With fd If .Show = -1 Then Call ReadCSV(Folder, SearchData, DestSht) End If End With Set fd = Nothing End Sub I have not included the Sub routine here, possibly that is where the problem is. Could someone please help with this VBA? Thank you! -- Linda |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Select File names and select a location of file | Excel Programming | |||
open file dialog-select file-import worksheet | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming | |||
Prompt user to select file with default file selected dialog | Excel Programming |