Run Code - Switchboard

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have vb code that is currently activated by the On Click event of a command
button. I would like to assign the code to a button on the switchboard and
am trying to use the Run Code option with very little success.

Is there a special naming convention for the function / subroutine? The
name of my function is RunExcel()

Your help is much appreciated
 
The RunCode action is only available from a macro, not Visual Basic code. To
run a function in code you can add the following to your control's event in
the property sheet:

=RunExcel()

or you can call a function in VBA code like:

Call RunExcel

if it's a sub, call it in code like:

RunExcel
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads
http://www.datastrat.com
http://www.mvps.org/access
 
Back
Top