LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Programming the Command button

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
 
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
Counting, command button and programming in VB ElFrodo Excel Discussion (Misc queries) 5 February 23rd 07 05:24 AM
Programming a Command Button TBoe Excel Programming 2 February 12th 07 10:51 PM
Programming a "Save as..." command button within Excel DavidHawes Excel Discussion (Misc queries) 2 November 13th 06 02:48 PM
Multiple Command button programming Good Time Excel Programming 2 September 15th 06 12:53 AM
Programming command button to execute on a different worksheet Ed[_21_] Excel Programming 4 July 29th 04 12:17 AM


All times are GMT +1. The time now is 05:06 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"