+ Reply to Thread
Results 1 to 3 of 3

vba to hide/unhide worksheets with conditions

Hybrid View

  1. #1
    Registered User
    Join Date
    03-27-2005
    Posts
    59

    vba to hide/unhide worksheets with conditions

    hi first thread so please help

    is it possible to enter vba code to hide and unhide worksheets under certain conditions, i am a personal trainer and am writing an exercise programme however now have about 15 worksheets and would like to make it more user friendly is it possible for example after if a cell that contains the number of workouts is greater than 20 the currant programme on worksheet 1 to hide and worksheet 2 to appear then after 30 workouts worksheet 2 to hide and worksheet 3 to appear etc etc

    thanks in advance all

    carl

  2. #2
    Registered User
    Join Date
    08-29-2012
    Location
    Brush Prairie, WA
    MS-Off Ver
    Excel 2010
    Posts
    2

    Re: vba to hide/unhide worksheets with conditions

    Unhide a worksheet:
    There are several ways to hide or unhide a single worksheet. If you want to work with multiple worksheets then there are better methods than this.
    For one or two worksheets, here are some examples.

    Sheet1.Visible = xlSheetVisible
    Sheets("Formulas").Visible = xlSheetVisible
    Sheets(1).Visible = True

    'An example of hiding a worksheet:
    Sheets("Formulas").Visible = False

  3. #3
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,167

    Re: vba to hide/unhide worksheets with conditions

    sttjones,

    Its not likely that the original poster will come back after 7 yrs for an answer but it may help others surely.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

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