Does anyone know of a way to open Excel documents through Visual Basic when the path contains more than one space? When I try opening a document where there is more than one space in the pathname I receive the following error, File could not be found. Check the spelling of the of the file name... But, the file is really in that location. When I rename the file and subfolders to contain no spaces or replace the spaces with underscores the file opens just fine. If anyone knows a way around this, I'd greatly appreciate any help. Thanks. I am currently using the following function to open the file.
Dim ExcelApp As Object
Set ExcelApp = CreateObject("Excel.Application"
ExcelApp.Visible = True
ExcelApp.Workbooks.Open txtFilename.Text
Dim ExcelApp As Object
Set ExcelApp = CreateObject("Excel.Application"
ExcelApp.Workbooks.Open txtFilename.Text