+ Reply to Thread
Results 1 to 4 of 4

locking the zoom on a page?

Hybrid View

  1. #1
    Registered User
    Join Date
    01-04-2007
    Posts
    31

    locking the zoom on a page?

    is it posible to lock the zoom and scrolling on only one sheet of a workbook. so that the users cant scrole up and down and change the amount of zoom.
    cheers

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    You could set the Range which would stop scrolling. Need to add the below and close and re-open file to work.

    Code goes into thisworkbook (see link below for instructions)

    Private Sub Workbook_Open()
    With Sheets("Sheet1")
    .Activate
    .ScrollArea = "A1:E30"  'Change to your range
    End With
    
    ActiveWindow.DisplayHeadings = False
    End Sub
    Not sure about the Zoom. I assume it would be a Event macro on the sheet

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    01-04-2007
    Posts
    31
    i understand how this would work but where would i place it in the the vba editor as it is a seperate sub function so it will not fit in with the rest of the code

  4. #4
    Forum Contributor
    Join Date
    03-13-2005
    Posts
    6,195
    Quote Originally Posted by shortman_alan
    i understand how this would work but where would i place it in the the vba editor as it is a seperate sub function so it will not fit in with the rest of the code
    Hi,

    try any of
    Private Sub Workbook_Activate() 
        With ActiveWindow 
            .DisplayHeadings = False 
            .DisplayHorizontalScrollBar = False 
            .DisplayVerticalScrollBar = False 
            .DisplayWorkbookTabs = False 
        End With
    this will allow the user to scroll other workbooks that are open.

    If for a specific sheet then in the sheet when activated.

    Private Sub Worksheet_Activate()

    When leaving the sheet/book you need to make the settings True


    Hope this helps.
    ---
    hth
    ---
    Si fractum non sit, noli id reficere.

+ 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