Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default command button


I am trying to stop the navigation and password request of a comman
button happening when the specified criteria are meet ==I
Sheets("NMLists").Range("r5") = "NM 4" Then== . However if th
criteria are not meet then i need the password and navigation functio
to continue.

Help as always greatly appreciated.

Kristan

Private Sub CommandButton4_Click()
If Sheets("NMLists").Range("r5") = "NM 4" Then
Worksheets("navigation").Select
Else
End If
Set Password = Sheets("NMLists").Range("z5")
If InputBox("Please Enter the Password" _
, "Enter Password") _
< Password Then
Sheets("Navigation").Select
Else
CommandButton4.Caption = Sheets("NMLists").Range("r5")
Worksheets("NM 4").Select
Me.Visible = True
End If
End Su

--
Kstalke
-----------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...fo&userid=2469
View this thread: http://www.excelforum.com/showthread.php?threadid=38663

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 226
Default command button

It's a little difficult to work out exactly what you are trying to do but you
might want to move the first End If down to the end of the procedu

Private Sub CommandButton4_Click()
If Sheets("NMLists").Range("r5") = "NM 4" Then
Worksheets("navigation").Select
Else
Set Password = Sheets("NMLists").Range("z5")
If InputBox("Please Enter the Password" _
, "Enter Password") _
< Password Then
Sheets("Navigation").Select
Else
CommandButton4.Caption = Sheets("NMLists").Range("r5")
Worksheets("NM 4").Select
Me.Visible = True
End If
End If
End Sub

Hope this helps
Rowan

"Kstalker" wrote:


I am trying to stop the navigation and password request of a command
button happening when the specified criteria are meet ==If
Sheets("NMLists").Range("r5") = "NM 4" Then== . However if the
criteria are not meet then i need the password and navigation function
to continue.

Help as always greatly appreciated.

Kristan

Private Sub CommandButton4_Click()
If Sheets("NMLists").Range("r5") = "NM 4" Then
Worksheets("navigation").Select
Else
End If
Set Password = Sheets("NMLists").Range("z5")
If InputBox("Please Enter the Password" _
, "Enter Password") _
< Password Then
Sheets("Navigation").Select
Else
CommandButton4.Caption = Sheets("NMLists").Range("r5")
Worksheets("NM 4").Select
Me.Visible = True
End If
End Sub


--
Kstalker
------------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...o&userid=24699
View this thread: http://www.excelforum.com/showthread...hreadid=386632


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default command button


Thanks Rowan

Worked exactly as I needed.

Regards

Kristan


--
Kstalker
------------------------------------------------------------------------
Kstalker's Profile: http://www.excelforum.com/member.php...o&userid=24699
View this thread: http://www.excelforum.com/showthread...hreadid=386632

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
Command Button Priss Excel Worksheet Functions 11 February 4th 09 05:48 PM
command button add another command Wanna Learn Excel Discussion (Misc queries) 5 December 7th 08 11:42 PM
Command Button EngelseBoer Excel Discussion (Misc queries) 7 August 12th 08 10:46 PM
Command Button vs Control Button RGibson Excel Programming 1 October 14th 03 02:24 AM
Command Button vs Form Button T K Excel Programming 4 August 26th 03 07:26 PM


All times are GMT +1. The time now is 08:06 AM.

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

About Us

"It's about Microsoft Excel"