Technique for switching to the VBE

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
 
C

Claus Busch

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
 
I

isabelle

hi GJ,

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


--
isabelle



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

Don Guillett

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.
 
A

Auric__

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.)
 
R

Ron Rosenfeld

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.

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.
 
G

GS

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.
 
G

GS

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!
 
A

Auric__

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.
 
A

Auric__

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.
 
G

Gord Dibben

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
 
I

isabelle

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 :
 
G

GS

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?
 
G

GJ

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!
 
R

Ron Rosenfeld

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.
 
G

GJ

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top