Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default automating (alt & f11)

my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,533
Default automating (alt & f11)

I think this is what you need.

Private Sub CommandButton5_Click()

If Me.textbox1.Value = "mypass" Then
Application.Visible = True
Unload UserForm1
End If

End Sub

//Per

"pswanie" skrev i en meddelelse
...
my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that
textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default automating (alt & f11)

Try this...

Private Sub CommandButton5_Click()
If TextBox1.Text = "mypass" Then
Application.Visible = True
Unload UserForm1
End If
End Sub

If you are doing what I think you are doing, you should know (at least I'm
pretty sure that) your password will be embedded in the saved workbook as
plain text; viewable with a plain text editor like Notepad. True, someone
would have to know where to look, but it might be easy to locate. You might
want to encrypt it a little bit to make it harder to find. One way, perhaps,
would be to mix it in between other characters (maybe locating each letter
as the 3rd character in a much bigger string of characters) and run a loop
to pick them out.

Rick


"pswanie" wrote in message
...
my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that
textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default automating (alt & f11)

great idea.... jip im aware that its easy to crack that..

how would i go about to use that loop idea?





"Rick Rothstein (MVP - VB)" wrote:

Try this...

Private Sub CommandButton5_Click()
If TextBox1.Text = "mypass" Then
Application.Visible = True
Unload UserForm1
End If
End Sub

If you are doing what I think you are doing, you should know (at least I'm
pretty sure that) your password will be embedded in the saved workbook as
plain text; viewable with a plain text editor like Notepad. True, someone
would have to know where to look, but it might be easy to locate. You might
want to encrypt it a little bit to make it harder to find. One way, perhaps,
would be to mix it in between other characters (maybe locating each letter
as the 3rd character in a much bigger string of characters) and run a loop
to pick them out.

Rick


"pswanie" wrote in message
...
my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that
textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default automating (alt & f11)

Try this (the password is still mypass)...

Private Sub CommandButton5_Click()
Dim X As Long
Dim PW As String
Const HiddenPassword = "@32m )#yeX*p p!a64bs ##sdf2"
For X = 4 To Len(HiddenPassword) Step 4
PW = PW & Mid(HiddenPassword, X, 1)
Next
If TextBox1.Text = PW Then
Application.Visible = True
Unload UserForm1
End If
End Sub

You can change the starting spot in for you password in the HiddenPassword
constant, and also vary the number of characters between the letters of your
password, you just have to adjust the starting point and Step values in the
For-Next loop. This way, if someone looks, they will only see @32m )#yeX*p
p!a64bs ##sdf2 and not your actual password. Of course, this is an extremely
simple encryption scheme, but it should suffice for normal situations. Note
that if you use a regular word or phrase, it might still be discoverable by
"prying eyes", but if you mix punctuation marks into your "real" password,
it should be harder to find in random mix of letters.

Rick


"pswanie" wrote in message
...
great idea.... jip im aware that its easy to crack that..

how would i go about to use that loop idea?





"Rick Rothstein (MVP - VB)" wrote:

Try this...

Private Sub CommandButton5_Click()
If TextBox1.Text = "mypass" Then
Application.Visible = True
Unload UserForm1
End If
End Sub

If you are doing what I think you are doing, you should know (at least
I'm
pretty sure that) your password will be embedded in the saved workbook as
plain text; viewable with a plain text editor like Notepad. True, someone
would have to know where to look, but it might be easy to locate. You
might
want to encrypt it a little bit to make it harder to find. One way,
perhaps,
would be to mix it in between other characters (maybe locating each
letter
as the 3rd character in a much bigger string of characters) and run a
loop
to pick them out.

Rick


"pswanie" wrote in message
...
my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that
textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload
userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub







  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 247
Default automating (alt & f11)

i needed to add that when userform unload and application vissible hapens.
would it be possible to automate the alt & F11 keystroke?




"pswanie" wrote:

my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default automating (alt & f11)

Put this right after your "Unload UserForm1" statement...

Application.OnKey "%{F11}"

Rick


"pswanie" wrote in message
...
i needed to add that when userform unload and application vissible hapens.
would it be possible to automate the alt & F11 keystroke?




"pswanie" wrote:

my previous posting was not clear i think...

what can i add to a command so that when i click it, it checks that
textbox1
got "mypass" and then run the sub

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

click commandbutton1 go and check if textbox1 contain "mypass"
commandbutton1 make the application visible = true and unload userform1.

then i can get to my macros etc..
i got this.


Private Sub CommandButton5_Click()


Application.Visible = True
Unload UserForm1


End Sub



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automating a workbook ??? inktec[_3_] Excel Programming 0 July 6th 06 01:45 PM
Automating Tab names Stilla Excel Worksheet Functions 2 May 10th 06 11:42 PM
Automating a checklist FMW Excel Programming 5 October 20th 05 05:16 PM
Automating using VBA Automate my database Excel Worksheet Functions 1 September 1st 05 01:51 PM
Automating PP from XL Keith R[_3_] Excel Programming 0 November 20th 03 08:42 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"