Starting VBE at EXCEL Start

  • Thread starter Thread starter Don
  • Start date Start date
D

Don

I'm trying to start Visual Basic Editor when EXCEL starts.

I have an Add-In that has a workbook_Open macro:

Call Appl_Position
Call AddUtilities
Call InitArrays
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.getfile(FileSpec)
If Int(Now) > Int(f.datelastmodified) Then start an appl
SendKeys "%{F11}"

It doesn't work most of the time.

Is there another way to do this.

Thanks,
Don
 
If you are starting an application, then it probably has the focus and your
sendkeys goes to that application.

Perhaps you want to do the send keys when you know that Excel will have the
focus.
 
Hi Don,
I'm trying to start Visual Basic Editor when EXCEL starts.

I have an Add-In that has a workbook_Open macro:

Call Appl_Position
Call AddUtilities
Call InitArrays
Set fs = CreateObject("Scripting.FileSystemObject")
Set f = fs.getfile(FileSpec)
If Int(Now) > Int(f.datelastmodified) Then start an appl
SendKeys "%{F11}"

It doesn't work most of the time.

Is there another way to do this.

try this:

Sub OpenVBEWindow()
With Application.VBE.MainWindow
.Visible = True
.SetFocus
End With
End Sub

--
Regards

Melanie Breden
- Microsoft MVP für Excel -

http://excel.codebooks.de (Das Excel-VBA Codebook)
 

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

Back
Top