Verify that the vbe is active when using sendkeys

  • Thread starter Thread starter PeterS
  • Start date Start date
P

PeterS

I am trying to use sendkeys. Is there a way to confirm that I have
the macro in the vbe editor, so that I have sendkeys access the vbe
editor rather than accidentally access regular excel menu?

thanks for your help
 
You can switch to the VBE using this

Application.VBE.ActiveCodePane.Sho

This switches to the VBE - a further refiement might be to make the 'right' code visible?
 
An even further refinement might be to figure out how to not have to use
sendkeys - depending on what you are doing that may be the best solution
although it is admitted that not every action can be accomplished with code.

--
Regards,
Tom Ogilvy

AA2e72E said:
You can switch to the VBE using this:

Application.VBE.ActiveCodePane.Show

This switches to the VBE - a further refiement might be to make the
'right' code visible?
 

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