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

Running a module from Switchboard?

Status
Not open for further replies.

STaL1N

Technical User
May 3, 2004
11
GB
my code is as follows
Code:
Public Function MergeReportData()
Dim strPath1 As String
Dim strPath2 As String
    strPath1 = "P:\Apps\32BitWin\Office2000\PFiles\MSOffice\Office\WINWORD.EXE"
    strPath2 = "N:\MyWork\ASComp\ASCoursework\rawCompanyOverOneYear.doc"

Shell strPath1 & " " & strPath2, vbNormalFocus
End Function

I have chosen the run code option in switchboard items and i typed in "MergeReportData" as the function name, however when i click the switchboard command button an error occurs
"There was an error executing the command"

does anybody have any ideas?
 
Let's execute the code without the switchboard and debug it there first. Create a form with a command button that makes a function call to this function. See if it works or you get the same error.

Bob Scriver
[blue]Want the best answers? See FAQ181-2886[/blue]


 
its ok i got a workaround. my switchboard now runs a macro which in turn runs the code!

thanks anyway!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top