![]() |
Code to launch VB editor
I am running XP with Office 2002.
What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
Code to launch VB editor
Sub vbe()
Application.vbe.MainWindow.Visible = True End Sub 'Tools --Macro--Security 'Click the Trusted Publisher Tab 'Click Trust access to Visual Basic Project Checkbox 'Click ok "Boog" wrote: I am running XP with Office 2002. What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
Code to launch VB editor
That has to be the only combination I didn't try.
Thank you for the prompt solution. Cheers. "Office_Novice" wrote: Sub vbe() Application.vbe.MainWindow.Visible = True End Sub 'Tools --Macro--Security 'Click the Trusted Publisher Tab 'Click Trust access to Visual Basic Project Checkbox 'Click ok "Boog" wrote: I am running XP with Office 2002. What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
Code to launch VB editor
You could also use this:
CommandBars("Worksheet Menu Bar").Controls("Tools").Controls("Macro").Controls ("Visual Basic Editor").accDoDefaultAction "Boog" wrote: That has to be the only combination I didn't try. Thank you for the prompt solution. Cheers. "Office_Novice" wrote: Sub vbe() Application.vbe.MainWindow.Visible = True End Sub 'Tools --Macro--Security 'Click the Trusted Publisher Tab 'Click Trust access to Visual Basic Project Checkbox 'Click ok "Boog" wrote: I am running XP with Office 2002. What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
Code to launch VB editor
Alt-F11 will also open the VBE, and takes less time than mousing over a button, if your hands are
already on the keyboard.... HTH, Bernie MS Excel MVP "Boog" wrote in message ... I am running XP with Office 2002. What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
Code to launch VB editor
Bernie,
I have used Alt-F11 in the past but I usually have the mouse in hand. Thanks to all for their input. "Bernie Deitrick" wrote: Alt-F11 will also open the VBE, and takes less time than mousing over a button, if your hands are already on the keyboard.... HTH, Bernie MS Excel MVP "Boog" wrote in message ... I am running XP with Office 2002. What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
Code to launch VB editor
Thank you Martin
"Martin" wrote: You could also use this: CommandBars("Worksheet Menu Bar").Controls("Tools").Controls("Macro").Controls ("Visual Basic Editor").accDoDefaultAction "Boog" wrote: That has to be the only combination I didn't try. Thank you for the prompt solution. Cheers. "Office_Novice" wrote: Sub vbe() Application.vbe.MainWindow.Visible = True End Sub 'Tools --Macro--Security 'Click the Trusted Publisher Tab 'Click Trust access to Visual Basic Project Checkbox 'Click ok "Boog" wrote: I am running XP with Office 2002. What is the VB code to launch the VB editor. I would like to assign it to a toolbar button. It would save time, albeit very little, but in the world of nanoseconds and milliseconds, it is long. I have searched newsgroups, Google and visited various websites. Chip Pearson's site is superlative at providing code to work in the editor but I did not locate the code to actually launch the editor. I have also used all combinations of code in VB (ie: Application.VBE. ...) but cannot produce the desired result. Thank you ahead of time for your time and consideration. |
All times are GMT +1. The time now is 01:28 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com