+ Reply to Thread
Results 1 to 2 of 2

placement of code to dynamically hide code

  1. #1
    Registered User
    Join Date
    08-22-2005
    Posts
    15

    placement of code to dynamically hide code

    Hi - I have a 50 sheet, 9-week report that I want to deliver each week so it shows the current week and all previous weeks. (I open each sheet via an add-in user menu) I have counters for each week in cells A6 through A104. There is an integer for the current week in E4. The code below should do what I need but I do not know where is the best place to put the code.

    Please Login or Register  to view this content.
    Thanks in advance.

  2. #2
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    I think you want the code to hide/unhide cells depending on the value in E4. Is E4 the result of a formula/ If it is then you can trigger the macro with the WorkBook_Open event.
    Please Login or Register  to view this content.
    Your code isn't quite right, you can't refer to range as E4, you need to use Range("E4"). Try this ameneded code
    Please Login or Register  to view this content.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ 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