Results 1 to 4 of 4

Hide/Show Command button based on cell value

Threaded View

paxile2k Hide/Show Command button... 01-12-2010, 06:00 PM
Cheeky Charlie Re: Hide/Show Command button... 01-12-2010, 06:09 PM
paxile2k Re: Hide/Show Command button... 01-12-2010, 06:29 PM
Cheeky Charlie Re: Hide/Show Command button... 01-13-2010, 08:59 AM
  1. #1
    Forum Contributor
    Join Date
    07-22-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    122

    Hide/Show Command button based on cell value

    I am trying to write a code that allows a command button to be hidden on spreadsheet till a value of cell is displayed.

    here is an example to the code:

    Private Sub UserForm_Activate()
        Sheets("Sheet1").Select
        If Range("$A$1").Value = 0 Then
            Forms.CommandButton1.Visible = True
        Else
            Forms.CommandButton1.Visible = False
        End If
    End Sub
    The button still remains visable regardless of cell value that is am using as a reference "A1". As a side note, I am also looking at a way to add additional command buttons that will follow the same idea just different conditions. Any help would be appreciated. Thankyou in advance
    Last edited by paxile2k; 01-12-2010 at 09:27 PM. Reason: missing info

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1