Solved Allow VBA edit even acForm menus is disabled. (1 Viewer)

vhung

Member
Local time
Yesterday, 17:34
Joined
Jul 8, 2020
Messages
235
Good day...

Could anybody share help, to give tips on editing VBA
While acForms default menus is disabled.
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Today, 08:34
Joined
May 7, 2009
Messages
19,242
1. Enable the default menus first

2.Create a public function:

Public Function fnOpenVBE()
DoCmd.OpenModule "Module1" 'replace with module that is present in your db
End Function

3.lastly, create a macro:

on design macro design view, add Submacro.
name it "^L" (without quote, this will create a shortcut of Ctrl-L).
add:
RunCode
function name: fnOpenVBE()


save this macro as "AutoKeys" (without quotes).

4.now, disable default menus again.

close and reopen the db.
VBA is available when you press Ctrl+L.
 

vhung

Member
Local time
Yesterday, 17:34
Joined
Jul 8, 2020
Messages
235
1. Enable the default menus first

2.Create a public function:

Public Function fnOpenVBE()
DoCmd.OpenModule "Module1" 'replace with module that is present in your db
End Function

3.lastly, create a macro:

on design macro design view, add Submacro.
name it "^L" (without quote, this will create a shortcut of Ctrl-L).
add:
RunCode
function name: fnOpenVBE()


save this macro as "AutoKeys" (without quotes).

4.now, disable default menus again.

close and reopen the db.
VBA is available when you press Ctrl+L.
Ok Arnel,
Thank you very much
I will try the steps you made.
 

vhung

Member
Local time
Yesterday, 17:34
Joined
Jul 8, 2020
Messages
235
I change this command
"DoCmd.OpenModule "Module1" 'replace with module that is present in your db"

Into:
Application.VBE.MainWindow.Visible = True

Because the vbe open is password protected
then use the CtrlG to open submacro Autokeys "^g"

It's all done...
I also add on a combo select = "VBview"
then Application.VBE.MainWindow.Visible = True

Could be the use of CtrlG or "combo select"
 

Users who are viewing this thread

Top Bottom