Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 163
Default Buttons in excel 2003

Hi all, I have a button and when pressed would like to say 'Please enter your
password, once the password has been validated the rest of the macro will run.

Is this possible?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Buttons in excel 2003

Neil,

This a a simple way but you won't get a 'masked' password input box where
the characters typed appear as *** or something else. If you want to do that
then post back

Sub Password()
Dim Response As String
Dim MyPass As String
MyPass = "xxx"
Response = InputBox("Enter your password")
If Response < MyPass Then
MsgBox "Not Authorised"
Exit Sub
End If
'Your Code

End Sub
--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Neil Holden" wrote:

Hi all, I have a button and when pressed would like to say 'Please enter your
password, once the password has been validated the rest of the macro will run.

Is this possible?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Buttons in excel 2003

Sorry you wanted a button on the sheet. Put a button on the sheet, right
click it - view code and paste the code below in.

Private Sub CommandButton1_Click()
Dim Response As String
Dim MyPass As String
MyPass = "xxx"
Response = InputBox("Enter your password")
If Response < MyPass Then
MsgBox "Not Authorised"
Exit Sub
End If
Call YourSubName
End Sub

--
Mike

When competing hypotheses are otherwise equal, adopt the hypothesis that
introduces the fewest assumptions while still sufficiently answering the
question.


"Neil Holden" wrote:

Hi all, I have a button and when pressed would like to say 'Please enter your
password, once the password has been validated the rest of the macro will run.

Is this possible?

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
How do I get 2003 Macros and Toolbar Buttons form Excel 2003 to 20 Scott Sornberger New Users to Excel 2 March 19th 08 11:42 AM
buttons in excel 2003 neilb514 New Users to Excel 3 November 28th 07 09:47 PM
Option Buttons from the Forms Toolbar - Excel 2003 mickey Excel Worksheet Functions 2 October 14th 07 11:32 AM
tab scrolling buttons - excel 2003 missdona Excel Worksheet Functions 1 September 13th 05 08:22 PM
excel 2003 - macros & buttons mikey New Users to Excel 2 May 19th 05 11:51 AM


All times are GMT +1. The time now is 01:24 PM.

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"