Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

File Name Problem

Status
Not open for further replies.

gregmw

MIS
Jun 11, 2002
23
NZ
I have the following code. To open a specfic file in excel from Access.

Dim stAppName As String
stAppName = "Excel.exe T:\GlobalRisks\MI\Clientmi\600 Group\600Grp_Latest_Report.xls"
Call Shell(stAppName, 1)

It works fine as long as there is no spaces in the folder names. So "600Group" as a folder name works but if the folder is called "600 Group". It will try and open folder "600". So my question is how do I get the code to read "600 Group" as the full folder name.

Thanks
 
I think, but have not tried it:
stAppName = "Excel.exe ""T:\GlobalRisks\MI\Clientmi\600 Group\600Grp_Latest_Report.xls"",/color]" ----------------------------------------
Ben O'Hara
----------------------------------------
 
That works fine, And such a simple answer. Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top