PC Review


Reply
Thread Tools Rate Thread

Code Snippet - Activate VBE window

 
 
Tim Childs
Guest
Posts: n/a
 
      9th Nov 2010
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



 
Reply With Quote
 
 
 
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      9th Nov 2010
On Nov 9, 12:58*pm, "Tim Childs" <zx...@NOSPAMyahoo.co.uk> 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 view>toolbars>visual basic
 
Reply With Quote
 
Tim Childs
Guest
Posts: n/a
 
      10th Nov 2010
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" <(E-Mail Removed)> wrote in message
news:9dfa566f-98c2-416c-b9f6-(E-Mail Removed)...
On Nov 9, 12:58 pm, "Tim Childs" <zx...@NOSPAMyahoo.co.uk> 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 view>toolbars>visual basic



 
Reply With Quote
 
Don Guillett Excel MVP
Guest
Posts: n/a
 
      10th Nov 2010
On Nov 10, 1:23*am, "Tim Childs" <zx...@NOSPAMyahoo.co.uk> 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" <dguille...@austin.rr.com> wrote in messagenews:9dfa566f-98c2-416c-b9f6-(E-Mail Removed)...
> On Nov 9, 12:58 pm, "Tim Childs" <zx...@NOSPAMyahoo.co.uk> 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 view>toolbars>visual basic


Sub GotoVBE()
Application.VBE.MainWindow.Visible = True
End Sub
 
Reply With Quote
 
Tim Childs
Guest
Posts: n/a
 
      10th Nov 2010
Hi Don

thanks for sending that - will deploy in the proc.

bw

Tim

"Don Guillett Excel MVP" <(E-Mail Removed)> wrote in message
news:1fc741e2-9947-41a3-af91-(E-Mail Removed)...
On Nov 10, 1:23 am, "Tim Childs" <zx...@NOSPAMyahoo.co.uk> 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" <dguille...@austin.rr.com> wrote in
> messagenews:9dfa566f-98c2-416c-b9f6-(E-Mail Removed)...
> On Nov 9, 12:58 pm, "Tim Childs" <zx...@NOSPAMyahoo.co.uk> 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 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



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: Help-Intellisense (Code Snippet) Tab Tab does not insert code (VS2008) Jeff Johnson Microsoft C# .NET 0 12th Jul 2010 10:37 PM
Code snippet tshad Microsoft C# .NET 3 22nd Oct 2008 05:13 PM
'close window' snippet - anyone know where? =?Utf-8?B?cGlua3BhbnRoZXI=?= Microsoft Frontpage 4 1st Mar 2006 12:15 AM
Re: code snippet help please Junior Microsoft Access Form Coding 0 7th Jul 2003 02:13 PM
Re: code snippet help please Allen Browne Microsoft Access Form Coding 0 7th Jul 2003 01:50 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 AM.