Discussion:
Run module from Switchboard
(too old to reply)
jy
2005-04-11 08:25:01 UTC
Permalink
Hi, I have converted some macros to VBA using the "Convert Macros to VB"
function.

Now, I would like to run the modules from the Switchboard. How do I do that?
I tried to use "Run code" using the Switchboard Manager but the error msg
appeared as "There was an error executing the command".

Is it possible to run the code even though I have set a password for the VB
Project Properties?

Thanks! ;-)
th0r0n
2005-04-11 11:55:04 UTC
Permalink
Hmmm,

How about running a Macro from the switchboard to run the sub of the
converted Macro?

Bit of a dodgy hack but it will work!
Post by jy
Hi, I have converted some macros to VBA using the "Convert Macros to VB"
function.
Now, I would like to run the modules from the Switchboard. How do I do that?
I tried to use "Run code" using the Switchboard Manager but the error msg
appeared as "There was an error executing the command".
Is it possible to run the code even though I have set a password for the VB
Project Properties?
Thanks! ;-)
jy
2005-04-12 01:20:01 UTC
Permalink
Hi th0r0n,

Thks for your prompt reply, but how do I do that? I am not sure how to run
the code. Btw, if I use this method, can others see my codes? Coz the reason
I wanted to convert to VBA was so that others are not able to see my working
file, ie my codes, etc. ;-)
Post by th0r0n
Hmmm,
How about running a Macro from the switchboard to run the sub of the
converted Macro?
Bit of a dodgy hack but it will work!
Post by jy
Hi, I have converted some macros to VBA using the "Convert Macros to VB"
function.
Now, I would like to run the modules from the Switchboard. How do I do that?
I tried to use "Run code" using the Switchboard Manager but the error msg
appeared as "There was an error executing the command".
Is it possible to run the code even though I have set a password for the VB
Project Properties?
Thanks! ;-)
th0r0n
2005-04-12 12:24:02 UTC
Permalink
Go to the Database Window (F11)

Click Macro > New Macro

Set the Action to 'RunCode'

Put the name of your Function in the "Run Function" Box in the bottom left.

Save that, go to your Switchboard Manager, Edit an Existing Switchboard and
add a new Run Macro Command,

Put the name of your Macro as the Macro Name in the Switchboard Manager.

Hope that helps.
Post by jy
Hi th0r0n,
Thks for your prompt reply, but how do I do that? I am not sure how to run
the code. Btw, if I use this method, can others see my codes? Coz the reason
I wanted to convert to VBA was so that others are not able to see my working
file, ie my codes, etc. ;-)
Post by th0r0n
Hmmm,
How about running a Macro from the switchboard to run the sub of the
converted Macro?
Bit of a dodgy hack but it will work!
Post by jy
Hi, I have converted some macros to VBA using the "Convert Macros to VB"
function.
Now, I would like to run the modules from the Switchboard. How do I do that?
I tried to use "Run code" using the Switchboard Manager but the error msg
appeared as "There was an error executing the command".
Is it possible to run the code even though I have set a password for the VB
Project Properties?
Thanks! ;-)
jy
2005-04-13 02:09:05 UTC
Permalink
Thanks th0r0n! I tried it and it works beautifully! Best of all, when I
export to MDE format, others can't see my code! ;-)
Post by th0r0n
Go to the Database Window (F11)
Click Macro > New Macro
Set the Action to 'RunCode'
Put the name of your Function in the "Run Function" Box in the bottom left.
Save that, go to your Switchboard Manager, Edit an Existing Switchboard and
add a new Run Macro Command,
Put the name of your Macro as the Macro Name in the Switchboard Manager.
Hope that helps.
Post by jy
Hi th0r0n,
Thks for your prompt reply, but how do I do that? I am not sure how to run
the code. Btw, if I use this method, can others see my codes? Coz the reason
I wanted to convert to VBA was so that others are not able to see my working
file, ie my codes, etc. ;-)
Post by th0r0n
Hmmm,
How about running a Macro from the switchboard to run the sub of the
converted Macro?
Bit of a dodgy hack but it will work!
Post by jy
Hi, I have converted some macros to VBA using the "Convert Macros to VB"
function.
Now, I would like to run the modules from the Switchboard. How do I do that?
I tried to use "Run code" using the Switchboard Manager but the error msg
appeared as "There was an error executing the command".
Is it possible to run the code even though I have set a password for the VB
Project Properties?
Thanks! ;-)
Loading...