Results 1 to 7 of 7

how to make workbook open code specific to a sheet

Threaded View

  1. #1
    Registered User
    Join Date
    11-11-2014
    Location
    Cheltenham, England
    MS-Off Ver
    2010
    Posts
    19

    how to make workbook open code specific to a sheet

    I have the following piece of code that works with no problems when associated with a specific sheet Sheets("IAMT") however I would like to move this code to the Workbook_Open() function but I don't know how to bound this to reference the specific sheet.

    The code is as follows

    Private Sub Workbook_Open()
     
        Application.ScreenUpdating = False
        For Each Cll In Range("F3:FF3")
            If Cll.Value > DTPicker22.Value Or Cll.Value < DTPicker21.Value Then Cll.EntireColumn.Hidden = True Else Cll.EntireColumn.Hidden = False
        Next Cll
        Application.ScreenUpdating = True
    End Sub
    help much appreciated
    Last edited by whitwoo; 12-18-2014 at 12:49 PM. Reason: Spelling!!

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 1
    Last Post: 11-28-2014, 06:28 AM
  2. [SOLVED] Macro to make the workbook open sheet 1
    By Oeysbrei in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-02-2012, 09:57 AM
  3. Master Sheet to Open Specific Sheet from a Separate Workbook
    By jennyaccord in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-14-2011, 10:40 AM
  4. Code to open workbook and change value in a specific cell
    By rhudgins in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 11-01-2010, 05:27 PM
  5. Replies: 9
    Last Post: 12-06-2005, 03:00 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