ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Auto code in VBE when pressing F7 (https://www.excelbanter.com/excel-programming/429080-auto-code-vbe-when-pressing-f7.html)

Bishop

Auto code in VBE when pressing F7
 
When I pull up a Form and press F7 to see the code VBE will automatically add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?

Bishop

Auto code in VBE when pressing F7
 
Hmm... not really what I was looking for. Pressing the F7 key allows me to
stay on the keyboard. And your method requires extra steps. I notice it
doesn't do this all the time. Surely there is a way to prevent it. Why else
would it do it on some forms and not others?

"Patrick Molloy" wrote:

simple ...don't press F7!

right-click the form and select View Code, or in the VBAProject window,
select the form and click the code icon or again right-click and select View
code

"Bishop" wrote in message
...
When I pull up a Form and press F7 to see the code VBE will automatically
add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?



Andy Pope

Auto code in VBE when pressing F7
 
Hi,

Once you have the code window open you could use CTRL+TAB to return to it.

F7 on a userform will take you to an event of the active control.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bishop" wrote in message
...
When I pull up a Form and press F7 to see the code VBE will automatically
add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?



Bishop

Auto code in VBE when pressing F7
 
CTRL+Tab seems to have no discernable order. It takes me from the the code
for Form1 to Module3 to Module 7 to Form2 to code for Form3 so on and so
forth. How do I set the tab order?

"Andy Pope" wrote:

Hi,

Once you have the code window open you could use CTRL+TAB to return to it.

F7 on a userform will take you to an event of the active control.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bishop" wrote in message
...
When I pull up a Form and press F7 to see the code VBE will automatically
add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?




Bishop

Ok, I figured it out
 
If you click on the Form name in the Project Window and hit F7 it will simply
show you the code. If you click on the actual Userform and hit F7 then it
will go to the code window and auto-populate a new procedure.

"Bishop" wrote:

When I pull up a Form and press F7 to see the code VBE will automatically add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?


Andy Pope

Auto code in VBE when pressing F7
 
The order is the same as the order of items under the Windows menu.

So if you want keystrokes only, ALT+W followed by the number of the window
to gain focus.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bishop" wrote in message
...
CTRL+Tab seems to have no discernable order. It takes me from the the
code
for Form1 to Module3 to Module 7 to Form2 to code for Form3 so on and so
forth. How do I set the tab order?

"Andy Pope" wrote:

Hi,

Once you have the code window open you could use CTRL+TAB to return to
it.

F7 on a userform will take you to an event of the active control.

Cheers
Andy

--

Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
"Bishop" wrote in message
...
When I pull up a Form and press F7 to see the code VBE will
automatically
add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?





Patrick Molloy

Auto code in VBE when pressing F7
 
understood. i get around this by double clicking a button or whatever that
has code written.
I agree , its a pain :(
- nope, I can't see how to prevent it I'm afraid

"Bishop" wrote in message
...
Hmm... not really what I was looking for. Pressing the F7 key allows me
to
stay on the keyboard. And your method requires extra steps. I notice it
doesn't do this all the time. Surely there is a way to prevent it. Why
else
would it do it on some forms and not others?

"Patrick Molloy" wrote:

simple ...don't press F7!

right-click the form and select View Code, or in the VBAProject window,
select the form and click the code icon or again right-click and select
View
code

"Bishop" wrote in message
...
When I pull up a Form and press F7 to see the code VBE will
automatically
add:

Sub BlahBlah_Click ()

End Sub

to the bottom of my existing code. How do I make this stop?




All times are GMT +1. The time now is 02:57 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com