View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
Matthew Pfluger Matthew Pfluger is offline
external usenet poster
 
Posts: 130
Default alt & f11 via macro

pswanie,

In my original post, the code:

Application.VBE.ActiveCodePane.Show

will do the same thing as Alt+F11. You can also use the SendKeys method:

Application.SendKeys ("%{F11}") where % stands for ALT. See the help files.

Matthew Pfluger

"pswanie" wrote:

jip...
thanx (i did repost. didnt know if u got it flaged for notify of replies...)

do u know how to get the (alt & F11) key stroke by code in that?

if pass = my pass
then alt & f11 key stroke and rest of code


"Matthew Pfluger" wrote:

Okay, then change this:

ActiveSheet.Shapes("Text Box 1").Select
If Selection.Characters.Text = "MyPass" Then

to

If Me.TextBox1.Text = "MyPass" Then

Does that work for you?
Matthew Pfluger

"pswanie" wrote:

i have the said textbox on a userform. the aplication (excell workbook) is
set to visible = valse

now if i enter "mypass" in the textbox it enable commandbutton1.

commandbutton1_click make the application visible = true and unload userform1.

then i can get to my macros etc..