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: 304
Default Option Button with VB code, not working

Why dosn't this work? Thanks
Sheets("INPUT_A").Select

If OptionButton2.Value = True Then
Sheets("AR").Select
Rows("17:20,35:38,53:56,78:81,102:105,140:147,160: 167,181:187").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ElseIf OptionButton3.Value = True Then
Sheets("AR").Select
Range("7:8,25:26,43:44,68:69,92:93,136:137,156:157 ,176:177").Select
Selection.Delete Shift:=xlUp
Range("A1").Select
ElseIf OptionButton4.Value = True Then
Sheets("AR").Select
Range( _

"7:8,17:20,25:26,35:38,43:44,53:56,68:69,78:81,92: 93,102:105,136:137,140:147,160:163,164:167,176:177 ,180:187,156:157" _
).Select
Selection.Delete Shift:=xlUp
Range("A1").Select
End If

Sheets("AR").Select
Range("A1").Select

or this:
If OptionButton2 Then
Call AR_GTD
ElseIf OptionButton3 Then
Call AR_Both
ElseIf OptionButton4 Then
Call AR_ECO
End If

 
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
Option Button code not working Sara Excel Discussion (Misc queries) 3 November 12th 08 06:09 PM
How do I select an option button using code Ayo Excel Programming 2 January 6th 08 08:25 AM
How to assign same code inside Option button code space ?? furbiuzzu Excel Programming 1 November 21st 06 02:36 PM
Code to tab from option button click Glen Millar Excel Programming 3 May 19th 04 02:14 AM
Old button code not working in Excel2002 shanej Excel Programming 0 July 16th 03 02:10 AM


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