Closed Thread
Results 1 to 3 of 3

Buttons help please

  1. #1
    Registered User
    Join Date
    12-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    27

    Buttons help please

    Hi everyone.
    I have the following code, basically it hides any lines with a value of 0 in the AH column.
    How do I put this in a button, click to run macro, then click to turn off macro and unhide lines.
    Im stressing out over this biggest brain fart in the world.

    Private Sub CommandButton1_Click()
    Sub HideRows()
    Application.ScreenUpdating = False
    Application.Calculation = xlManual

    For Each c In Range("AH4:AH146")
    If c.Value = 0 And c.Value <> "" Then Rows(c.Row).Hidden = True
    Next

    Application.Calculation = xlAutomatic
    Application.ScreenUpdating = True
    End Sub

  2. #2
    Registered User
    Join Date
    12-03-2013
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    27

    Re: Buttons help please

    i bet someone is going to solve this in 2 seconds and im gonna feel reall dooshy

  3. #3
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Buttons help please

    unfortunately:

    This is a duplicate post and as such does not comply with Rule 5 of our forum rules. This thread will now be closed, you may continue in your other thread.

    Thread Closed.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Macros with buttons, spin buttons, scroll buttons, etc.
    By qqbbppdd in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-12-2013, 09:34 AM
  2. enable certain combo buttons based on user selected option buttons
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2013, 06:43 AM
  3. How to insert and user of Buttons, Radio buttons, check boxes in excel sheet.
    By krishco in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-03-2013, 02:52 AM
  4. How to insert Buttons, radio buttons and check boxes in Excel
    By krishco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-01-2013, 08:13 AM
  5. How can I insert multiple sets of option buttons (radio buttons) in Excel 2010?
    By mickwooduclan in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 04-25-2013, 10:01 AM

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