T
Thomas Koester
Hello group,
I need to open a macro in design view using VBA. Here the code I am currently
using:
Private Sub OpenMacroInDesignMode(sMacro as String)
'-- activate database window (what enables its menu)
SendKeys "{F11}"
'-- wait until database window is open and menu is available
DoEvents
'-- now go to the screen with the macros
DoCmd.RunCommand acCmdViewMacros
'-- typing the name will select the wanted macro
SendKeys sMacro
'-- CTRL+ENTER will open the macro in design view
SendKeys "^{ENTER}"
End Sub
It works (in A2K) but I am not sure how version- and language-safe this is
(it is part of a published Add-In). Does anybody know a way to do this
without SendKeys?
Thanks
I need to open a macro in design view using VBA. Here the code I am currently
using:
Private Sub OpenMacroInDesignMode(sMacro as String)
'-- activate database window (what enables its menu)
SendKeys "{F11}"
'-- wait until database window is open and menu is available
DoEvents
'-- now go to the screen with the macros
DoCmd.RunCommand acCmdViewMacros
'-- typing the name will select the wanted macro
SendKeys sMacro
'-- CTRL+ENTER will open the macro in design view
SendKeys "^{ENTER}"
End Sub
It works (in A2K) but I am not sure how version- and language-safe this is
(it is part of a published Add-In). Does anybody know a way to do this
without SendKeys?
Thanks