Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi John,
sPath = "C:\test" sFilename = "My Import File*.xls" if len(dir(spath & "\" & sfilename))=0 then msgbox "No file" else sFilename = spath & "\" & dir(spath & "\" & sfilename) dim wb as workbook set wb = workbooks.open sfilename end if You can move "dim wb as workbook" into top of the procedure, if you prefer this location or to the top of the module to be able to work with wb in other procedures within the module. Regards, Ivan |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determine Excel file version with no file extension. | Excel Discussion (Misc queries) | |||
file format or file extension is not valid...error message | Excel Discussion (Misc queries) | |||
Additional file with no extension created during File Save As proc | Excel Discussion (Misc queries) | |||
I need to download an exel spreadsheet file. (file extension :xls) | Excel Discussion (Misc queries) | |||
Opening CSV file causes date differences | Excel Programming |