Code Snippet - Activate VBE window

T

Tim Childs

Hi

Can someone supply a neater way to actrivate the VB window using a
macro,please?

I used the code below but I think there must be something better:
ThisWorkbook.VBProject.VBE.MainWindow.SetFocus

Thanks

Tim
 
D

Don Guillett Excel MVP

Hi

Can someone supply a neater way to actrivate the VB window using a
macro,please?

I used the code below but I think there must be something better:
ThisWorkbook.VBProject.VBE.MainWindow.SetFocus

Thanks

Tim

Why not just use the icon from the view>toolbars>visual basic
 
T

Tim Childs

hi

thanks hor that but the reason i because I wanted it was to incorporate it
into a proc that needs to run in the VB window to work properly...

Tim

Hi

Can someone supply a neater way to actrivate the VB window using a
macro,please?

I used the code below but I think there must be something better:
ThisWorkbook.VBProject.VBE.MainWindow.SetFocus

Thanks

Tim

Why not just use the icon from the view>toolbars>visual basic
 
D

Don Guillett Excel MVP

hi

thanks hor that but the reason i because I wanted it was to incorporate it
into a proc that needs to run in the VB window to work properly...

Tim





Why not just use the icon from the view>toolbars>visual basic

Sub GotoVBE()
Application.VBE.MainWindow.Visible = True
End Sub
 
T

Tim Childs

Hi Don

thanks for sending that - will deploy in the proc.

bw

Tim

hi

thanks hor that but the reason i because I wanted it was to incorporate it
into a proc that needs to run in the VB window to work properly...

Tim

message



Why not just use the icon from the view>toolbars>visual basic

Sub GotoVBE()
Application.VBE.MainWindow.Visible = True
End Sub

__________ Information from ESET Smart Security, version of virus signature
database 5608 (20101110) __________

The message was checked by ESET Smart Security.

http://www.eset.com
 

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