Limited Code shown in developer window

peterhw

New Member
Joined
Jan 23, 2012
Messages
39
I have just joined this forum because I was having trouble with the formats for displaying my code in VBA

My first problem was not being able to 'dock' windows - shown on this post and solution suggested by Marcelo Branco (thank you)

http://www.mrexcel.com/forum/showthread.php?t=607518

Having implemented the above solution I now find that the code shown in the code window is only one object at a time -i.e.

Private Sub CommandButton1_Click()
shows only the code associated with this button ( in this case 4 lines)

similarly
Private Sub CommandButton2_Click()
shows only the code associated with this button

In the past I have been able to scroll up and down over several different objects but I can only access 1 object at a time by selecting from the drop down menu (i.e. userform, textbox1, CommandButton1 etc)
 
Last edited:

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
At the bottomleft corner of the codewindow, two little buttons are 'hidden' (at least in my experience, noone ever seems to know they're there :biggrin:).
One gives you procedure view, which you are in now, the other gives you full module view, and that is the one you need right now :)
 
Upvote 0
At the bottomleft corner of the codewindow, two little buttons are 'hidden' (at least in my experience, noone ever seems to know they're there :biggrin:).
One gives you procedure view, which you are in now, the other gives you full module view, and that is the one you need right now :)

Spot on - thanks - works straight away.

Understand what you say - you never notice them!
 
Upvote 0
Hehe, glad I can still learn you some new tricks Firefly :biggrin:

The annoying thing about those buttons is that this setting cannot be changed anywhere else, not via the menu, not via VBA... so if you don't see them, you're f#@[ed ...

You can read the current setting in VBA with
Code:
Debug.Print Application.VBE.ActiveCodePane.CodePaneView
which will return 0 for procedure view and 1 for module view.
 
Upvote 0
The annoying thing about those buttons is that this setting cannot be changed anywhere else, not via the menu, not via VBA... so if you don't see them, you're f#@[ed ...

Tools-Options, Editor tab, Window settings, 'Default to full module view'. You may have to toggle it off then on though.
 
Upvote 0
At the bottomleft corner of the codewindow, two little buttons are 'hidden' (at least in my experience, noone ever seems to know they're there :biggrin:).
One gives you procedure view, which you are in now, the other gives you full module view, and that is the one you need right now :)

Wow... completely new for me also
Thank you for sharing this

M.
 
Upvote 0

Forum statistics

Threads
1,213,565
Messages
6,114,338
Members
448,570
Latest member
rik81h

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top