Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I'm defining a constant that will access a file. I've been testing it with
the following constant: Const cstrDatabaseWB As String = "C:\Documents and Settings\5YPJB\My Documents\Excel documents\Sherry project\real1.xls" That works fine. Now I'm working with the real file, named by someone else, and I've got the constant defined as Const cstrDatabaseWB As String = "G:\WI\ACS\ACS QA\FY10 CQRS and Local Reviews (version 1).xls" There is a space in the folder name "ACS AQ" and multiple spaces in the filename. I'm getting a Run time Error 1004 Application/Object Defined Error when the code tries to execute the following line: Application.Workbooks.Open (cstrDatabaseWB) I tried using single quotes inside the double quotes around the file name but that didn't help. How do I need to modify this code to open this file? Any help will be greatly appreciated. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check for file in folder, if not there, open folder to rename file | Excel Programming | |||
Save file in a new folder, but create folder only if folder doesn't already exist? | Excel Programming | |||
Help: Can open a spreadsheet in a folder which contains spaces in the folder name! | Excel Programming | |||
Need code to save file to new folder, erase from old folder | Excel Discussion (Misc queries) | |||
Create Folder and Text File in folder | Excel Programming |