View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
rink rink is offline
external usenet poster
 
Posts: 8
Default Programming the Command button

On Jan 30, 9:42*am, JLGWhiz wrote:
Check the properties to see if "enabled" = True. *If the click is working,
you should get some indication, like the button disappears. *If the button
diappears on click then you have a code problem although I don't see one at a
quick glance.



"rink" wrote:
On Jan 30, 8:48 am, JLGWhiz wrote:
If you did not name the CommandButton "InputButton" then it will not work. *
You can use CommandButton1_Click if it is the only button. *Or make sure the
Name is changed in the properties window. *The caption is not the name.


" wrote:
Hello,


Maybe someone can tell me what I am doing wrong. *I wrote the
following Macro and it appears to run correctly, however when I assign
it to the command button, nothing executes. *The button clicks but
doesnt take you to the assigned sheet. *You help is much appreciated.


Sub InputButton_click()
'
' WDRIndOrder Macro
' Macro recorded 1/24/2008 by
'


'
* * If ("B2" = "WDR") And ("B10" = "Individual") And ("B14" =
"Active") Then
* * Sheets("NPDES Ind Order").Select("B1").Select
* * ElseIf ("B2" = "NPDES Permits") And ("B10" = "Individual") And
("B14" = "Active") Then
* * Sheets("WDR Ind Order").Select("B1").Select
* * ElseIf ("B2" = "WAIVER") And ("B10" = "Individual") And ("B14" =
"Active") Then
* * Sheets("WAIVER IND Order").Select("B1").Select
* * ElseIf ("B10" = "General") And ("B14" = "Active") Then
* * Sheets("General Order").Select("B1").Select
* * ElseIf ("B2" = "ENROLLEE") And ("B14" = "Active") Then
* * Sheets("Enrollee Record ").Select("B1").Select
* * ElseIf ("B14" = "Draft") Then
* * Sheets("Draft Order-Enrollee Record").Select("B1").Select
* * End If
End Sub- Hide quoted text -


- Show quoted text -


I edited the button and renamed it InputButton and assigned the Macro
abovebut it doesn't take me anywhere. *The cells I reference in the
code have dropdown choices, would that make a difference?- Hide quoted text -


- Show quoted text -


Yes the Enabled =True.