I have about 200 records in an Access database that each have a corresponding Excel file attached to it. I have this code
Expand|Select|Wrap|Line Numbers
- Set xlApp = New Excel.Application
- With xlApp
- .Visible = True
- Set xlWB = .Workbooks.Open("C:\Documents and Settings\All Users\" & Text167, , False)
- With xlWB.Sheets("Sheet1")
- End With
- End With
That code opens the Excel files perfectly EXCEPT when the filename has a period in it. Whether it's a period at the end or in the middle of the filename it won't open the file. So if it's "A.BC - 2005" or "ABC. - 2005" it won't open the file. It says the file doesn't exist.
Is there something I'm not seeing in the code?