LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
cru cru is offline
external usenet poster
 
Posts: 9
Default Hide/Unhide CommandButton by cell criteria

Can i have more than two range under SelectionChage?

I currently have this code but I got the first two range to work but the
third range does not work:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Range("D18").Value = "YES" Then
Me.CommandButton13.Visible = True
Else
Me.CommandButton13.Visible = False
End If
If Range("D19").Value = "YES" Then
Me.CommandButton28.Visible = True
Else
Me.CommandButton28.Visible = False
End If
If Range("D21").Value = "YES" Then
Me.CommandButton29.Visible = True
Else
Me.CommandButton29.Visible = False
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
Hide/Unhide with cell double click bones288 Excel Worksheet Functions 3 January 31st 12 07:47 PM
CommandButton used to hide and unhide rows Leiprecht Excel Discussion (Misc queries) 1 April 9th 09 06:05 PM
Hide or Unhide certain columns based on a cell value [email protected] Excel Programming 1 July 10th 06 10:17 AM
Macro to hide and unhide based on criteria [email protected] Excel Discussion (Misc queries) 1 June 5th 06 08:05 PM
Hide or Unhide Column Based on Cell Value windsurferLA Excel Programming 2 March 31st 06 11:06 PM


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