+ Reply to Thread
Results 1 to 4 of 4

Show and Hide a section of cells w a Checkbox Macro

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    33

    Show and Hide a section of cells w a Checkbox Macro

    Hi all,

    Im working with excel for mac 2007 and am trying to show and hide a section of cells when you click a checkbox macro but cant seem to find a tutorial on this.

    I would like to have it at the side and then hide a certain number of rows. Can anyone help w this macro or a link to a guide for this?

    Thanks!

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Show and Hide a section of cells w a Checkbox Macro

    I do know that VBA wasn't included in some earlier versions of Excel Mac Office. See if this helps:

    http://www.ehow.com/info_8529937_dif...excel-mac.html
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

  3. #3
    Registered User
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Show and Hide a section of cells w a Checkbox Macro

    thanks marvin. I just checked and VBA does work.

    below is the code that i have. basically the checkbox works to hide it but when i click it the second time it does not unhide it...any thoughts?

    Sub Hide()
    '
    ' Hide Macro
    '
    ' Keyboard Shortcut: Option+Cmd+g
    '
    Rows("13:17").Select
    Selection.EntireRow.Hidden = True
    End Sub
    Sub Macro2()
    '
    ' Macro2 Macro
    '
    ' Keyboard Shortcut: Option+Cmd+j
    '
    Rows("13:17").Select
    Selection.EntireRow.Hidden = False
    End Sub

  4. #4
    Registered User
    Join Date
    04-26-2013
    Location
    Canada
    MS-Off Ver
    Excel 2003
    Posts
    33

    Re: Show and Hide a section of cells w a Checkbox Macro

    nevermind figured it out

    Sub CheckBox1_Click()

    If Range("A4").Value = True Then
    Rows("13:17").EntireRow.Hidden = False
    Else
    Rows("13:17").EntireRow.Hidden = True
    End If

    End Sub

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Checkbox to show / hide workbook sheets
    By ed_b1 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-09-2013, 07:17 AM
  2. [SOLVED] [fixed]Hide Cells with checkbox - Find the mistake in my macro
    By Taktiker in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-11-2012, 03:08 AM
  3. Show/Hide Checkbox
    By kalyanverma in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 01-12-2011, 01:33 PM
  4. Show/Hide columns by checkbox and cell text
    By ksmoore in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-09-2010, 02:20 PM
  5. Use checkbox to show/hide sheets?
    By Zheno in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-03-2010, 02:49 PM

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