ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Code Snippet - Activate VBE window (https://www.excelbanter.com/excel-programming/443864-code-snippet-activate-vbe-window.html)

Tim Childs[_5_]

Code Snippet - Activate VBE window
 
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




Don Guillett Excel MVP

Code Snippet - Activate VBE window
 
On Nov 9, 12:58*pm, "Tim Childs" wrote:
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 viewtoolbarsvisual basic

Tim Childs[_5_]

Code Snippet - Activate VBE window
 
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

"Don Guillett Excel MVP" wrote in message
...
On Nov 9, 12:58 pm, "Tim Childs" wrote:
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 viewtoolbarsvisual basic




Don Guillett Excel MVP

Code Snippet - Activate VBE window
 
On Nov 10, 1:23*am, "Tim Childs" wrote:
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

"Don Guillett Excel MVP" wrote in ...
On Nov 9, 12:58 pm, "Tim Childs" wrote:

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 viewtoolbarsvisual basic


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

Tim Childs[_4_]

Code Snippet - Activate VBE window
 
Hi Don

thanks for sending that - will deploy in the proc.

bw

Tim

"Don Guillett Excel MVP" wrote in message
...
On Nov 10, 1:23 am, "Tim Childs" wrote:
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

"Don Guillett Excel MVP" wrote in
...
On Nov 9, 12:58 pm, "Tim Childs" wrote:

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 viewtoolbarsvisual 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





All times are GMT +1. The time now is 03:00 AM.

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