+ Reply to Thread
Results 1 to 2 of 2

VBA to lock scroll area of each tab

  1. #1
    Registered User
    Join Date
    12-18-2018
    Location
    Phuket, Thailand
    MS-Off Ver
    Windows 11 - MS Office 365
    Posts
    88

    VBA to lock scroll area of each tab

    Hey guys,

    I have created a spreadsheet that has many tabs, many buttons and many macros. All of the current VBA codes are only for ToggleButtons and are work fine.

    I now want to lock the scroll area and zoom for each individual tab (they differ somewhat).

    I tried this code but it did nothing:

    Private Sub Workbook_Open()
    Worksheets("CONTROL CENTER").ScrollArea = "$A$1:$O$25"
    End Sub

    I put this code into the same collection of VBA codes that I've already successfully setup, but I can still scroll wherever I want.

    Thanks in advance,

    Danny

  2. #2
    Forum Guru bakerman2's Avatar
    Join Date
    10-03-2012
    Location
    Antwerp, Belgium
    MS-Off Ver
    MO Prof Plus 2016
    Posts
    6,907

    Re: VBA to lock scroll area of each tab

    You need to put this into the ThisWorkbook-module to work.
    It will then work on opening the workbook.
    Avoid using Select, Selection and Activate in your code. Use With ... End With instead.
    You can show your appreciation for those that have helped you by clicking the * at the bottom left of any of their posts.

+ 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. Replies: 7
    Last Post: 12-18-2017, 09:29 PM
  2. lock scroll area
    By jeroenv in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-01-2017, 04:40 AM
  3. How to lock the scroll bar
    By karthisucc9 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-02-2012, 08:56 AM
  4. Restrict Scroll Area to Visible Area
    By Zimbo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-23-2008, 09:28 AM
  5. Scroll Lock
    By kteig in forum Excel General
    Replies: 4
    Last Post: 07-18-2008, 02:19 PM
  6. scroll lock
    By Benjamin in forum Excel General
    Replies: 3
    Last Post: 11-01-2005, 11:05 AM
  7. Scroll Lock
    By jrh in forum Excel General
    Replies: 0
    Last Post: 01-18-2005, 12:06 PM

Tags for this Thread

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