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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Application

Status
Not open for further replies.

gianina

Technical User
Jul 4, 2006
56
CA
Hi,

I am trying to create a button which will run an aplication....opening an excel file and I always got en error message that "file "aaaaa" cannot be found.

I am using Excel.exe m:\path of the file

Can someone please help me ?

Thanks.
G.
 
As you didn't post your code, I only can give you a suggestion:
Have a look at the FollowHyperlink method.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click

Dim stAppName As String

stAppName = "Excel.exe m:\QA\QUALITY MANAGEMENT SYSTEM\QUALITY COMPONENTS INTERNATIONAL\SUPPORTING DOCUMENTS & FORMS\CFM-EN 003 Engineering Change Notice.xls"
Call Shell(stAppName, 1)

Exit_Command1_Click:
Exit Sub

Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click

End Sub
 
stAppName = "Excel.exe [!]""[/!]m:\QA\QUALITY MANAGEMENT SYSTEM\QUALITY COMPONENTS INTERNATIONAL\SUPPORTING DOCUMENTS & FORMS\CFM-EN 003 Engineering Change Notice.xls[!]""[/!]"


My suggestion:
FollowHyperlink "m:\QA\QUALITY MANAGEMENT SYSTEM\QUALITY COMPONENTS INTERNATIONAL\SUPPORTING DOCUMENTS & FORMS\CFM-EN 003 Engineering Change Notice.xls"

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top