Technique for switching to the VBE

  • Thread starter Thread starter GJ
  • Start date Start date
G

GJ

Hi All,

In a book on vba Excel 2010, I read that we can activate the VBE and access
to the code module for the workbook with the following manner : Right-click
the workbook's title bar and choose View Code... (the workbook windows isn't
maximized)...but it doesn't run... It's not very important but have you try
this and does it run ?...

Thanks

GJ
 
Hi GJ,

Am Sun, 8 Jan 2012 12:30:45 +0100 schrieb GJ:
In a book on vba Excel 2010, I read that we can activate the VBE and access
to the code module for the workbook with the following manner : Right-click
the workbook's title bar and choose View Code... (the workbook windows isn't
maximized)...but it doesn't run... It's not very important but have you try
this and does it run ?...

try:
Alt+F11
or
Right click on sheets register and choose "View Code"


Regards
Claus Busch
 
hi GJ,

i didn't have xl2010 but it works correctly on xl2002


--
isabelle



Le 2012-01-08 06:30, GJ a écrit :
 
Hi All,

In a book on vba Excel 2010, I read that we can activate the VBE and access
to the code module for the workbook with the following manner : Right-click
the workbook's title bar and choose View Code... (the workbook windows isn't
maximized)...but it doesn't run... It's not very important but have you try
this and does it run ?...

Thanks

GJ

Get your money back. It's the workSHEET tab to right click. View code
takes you to THAT sheet's vbe and you can then navigate to the others
or the regular modules.
 
Don said:
Get your money back. It's the workSHEET tab to right click. View code
takes you to THAT sheet's vbe and you can then navigate to the others
or the regular modules.

Actually, if you do as GJ said -- have the workbook unmaximized, right-click
workbook's title bar -- you get a popup menu with the same "view source"
item. Works for me under both 2000 & 2007.

Personally, I prefer Alt+F11, as Claus mentioned. Faster & usually more
convenient.

(My minor bitch here is the fact that Alt+- no longer works in 2007 if the
workbook is maximized.)
 
Auric__ wrote on 1/8/2012 :
Actually, if you do as GJ said -- have the workbook unmaximized, right-click
workbook's title bar -- you get a popup menu with the same "view source"
item. Works for me under both 2000 & 2007.

Personally, I prefer Alt+F11, as Claus mentioned. Faster & usually more
convenient.

(My minor bitch here is the fact that Alt+- no longer works in 2007 if the
workbook is maximized.)

Alt+F11 works for me under xl9 to xl12, regardless of the workbook wind
size, even in 'Full Screen' view. Must be something wrong with your
version.
 
GJ explained :
Hi All,

In a book on vba Excel 2010, I read that we can activate the VBE and access
to the code module for the workbook with the following manner : Right-click
the workbook's title bar and choose View Code... (the workbook windows isn't
maximized)...but it doesn't run... It's not very important but have you try
this and does it run ?...

Thanks

GJ

Are you trying to access the VBE to write code for YOUR own project,
*OR* are you wanting to look at code in someone else's project. If the
latter, maybe their project locks you out so you can't get to the code!
 
Ron said:
Interesting. There must be some environmental setting because when I do
that, in Excel 2007, I get the

Restore
Move
Size
Minimize
Maximize
Close

right click options -- same behavior as with the title bar for virtually
evey other windo.

Is that the app's title bar, or the workbook's? Excel's title bar should give
that menu; right-clicking the *unmaximized* workbook's title bar under 2007
gives me this:
Save
Save As...
Print...
Page Setup...
Spelling...
-
New Window
Arrange...
Zoom...
-
View Code

IIRC 2000's menu is different, but does include "View Code"... somewhere.
 
GS said:
Auric__ wrote on 1/8/2012 :

Alt+F11 works for me under xl9 to xl12, regardless of the workbook wind
size, even in 'Full Screen' view. Must be something wrong with your
version.

Alt+F11 works for me too. I meant that Alt+- (dash/hypen) doesn't work under
2007 (and probably other versions with the ribbon instead of "normal" menus;
no experience on my end) with the workbook maximized.
 
Ron

Sounds like you are right-clicking on the Application Title Bar.

Restore the workbook window down inside a maximized application window
then r-click on the workbook title bar.

I get same menu on Excel 2003 or 2007 under same circumstances.

NOTE: I am running Windows 7

Does that make a difference?


Gord
 
try this,


Sub Test1()
Application.CommandBars("Document").Controls("View Code").Execute
End Sub


Sub Test2()
Application.CommandBars("Ply").Controls("View Code").Execute
End Sub


--
isabelle



Le 2012-01-08 23:12, isabelle a écrit :
 
Auric__ used his keyboard to write :
Alt+F11 works for me too. I meant that Alt+- (dash/hypen) doesn't work under
2007 (and probably other versions with the ribbon instead of "normal" menus;
no experience on my end) with the workbook maximized.

What does Alt+- have to do with accessing the VBE?
 
I try to write code for my own project ... I think as Ron Rosenfeld said
"There must be some environmental setting"
I use a french version because I live in France ... and I have a french
version of windows 7 ultimate 64 bits

Alt + F11 runs very well ... it's not a problem ...but it's interesting to
known why ...
Thanks for your response
GJ

"GS" a écrit dans le message de groupe de discussion :
[email protected]...

GJ explained :
Hi All,

In a book on vba Excel 2010, I read that we can activate the VBE and
access to the code module for the workbook with the following manner :
Right-click the workbook's title bar and choose View Code... (the workbook
windows isn't maximized)...but it doesn't run... It's not very important
but have you try this and does it run ?...

Thanks

GJ

Are you trying to access the VBE to write code for YOUR own project,
*OR* are you wanting to look at code in someone else's project. If the
latter, maybe their project locks you out so you can't get to the code!
 
Don't forget GJ that when you've got the VB editor open, you can then Alt+Tab backwards and forwards to Excel (or anything else you've got open), though Alt+F11 would still specifically take you from Excel to VBE.

And right-clicking on the Workbook titlebar doesn't do anything other than the usual 'Restore...' menu for me either in Excel 2010.

I suppose you could customise your Quick Access toolbar to include the Visual Basic command from the Developer Tab if you prefer mouse clicking to keyboard shortcuts :)
 
OK you are right, I have made also that error
Thanks
GJ

"Ron Rosenfeld" a écrit dans le message de groupe de discussion :
(e-mail address removed)...

Is that the app's title bar, or the workbook's?

Duh. <sound of hand slapping forehead>

Because the workbook title was in the app's title bar, I made that error.
You're absolutely correct; un-maximizing the WORKBOOK (and not the app
window), and right-clicking on that title bar does bring up the menu which
included View Code.
 
Back
Top