+ Reply to Thread
Results 1 to 6 of 6

Reference zoom levels to user entry cells on same sheet

  1. #1
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Reference zoom levels to user entry cells on same sheet

    I would like to allow users to adjust the regular zoom level and expanded zoom level when using a validation list. This macro works fine, but presetting this for user presents a problem with not knowing what screen size they are working on. The line xZoom =52 represents the zoom level when not in a validation cell. Can the 52 reference a cell on the sheet where the user can set it. The same for the xZoom =90 use the same active sheet and for example cell A1 = the 52 and A2 = the 90 setting. This macro is loaded into the sheet code

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)

    On Error GoTo LZoom
    Dim xZoom As Long
    xZoom = 52
    If Target.Validation.Type = xlValidateList Then xZoom = 90
    LZoom:
    ActiveWindow.Zoom = xZoom
    End Sub
    Last edited by spyac; 01-14-2018 at 07:35 PM.

  2. #2
    Registered User
    Join Date
    01-08-2018
    Location
    jerusalem
    MS-Off Ver
    2016
    Posts
    25

    Re: Reference zoom levels to user entry cells on same sheet

    Hi Spyac,
    'fraid I don't have a solution for you, but maybe you can help me.

    I can't get this code to work. The column with the drop down list is on Sheet1, the list range and data validation is on Sheet2, so where and how would I apply your code.

    Thanks for any help
    David

  3. #3
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Reference zoom levels to user entry cells on same sheet

    Quote Originally Posted by spyac View Post
    Can the 52 reference a cell on the sheet where the user can set it. The same for the xZoom =90
    Yes- like this
    Please Login or Register  to view this content.
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  4. #4
    Registered User
    Join Date
    01-08-2018
    Location
    jerusalem
    MS-Off Ver
    2016
    Posts
    25

    Re: Reference zoom levels to user entry cells on same sheet

    Hi I tried you code to zoom the dropdown content but I'm getting an error: "Unable to set Zoom property of the windows class"

    on line:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-08-2018
    Location
    jerusalem
    MS-Off Ver
    2016
    Posts
    25

    Re: Reference zoom levels to user entry cells on same sheet

    But this code seems to work:

    Please Login or Register  to view this content.
    Shame there isn't a
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    12-01-2017
    Location
    New Jersey
    MS-Off Ver
    2016
    Posts
    63

    Re: Reference zoom levels to user entry cells on same sheet

    Solved
    Thank You for the help The Range() worked great
    Last edited by spyac; 01-16-2018 at 10:32 PM. Reason: Solved

+ 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: 5
    Last Post: 05-31-2017, 08:12 AM
  2. Replies: 2
    Last Post: 02-10-2015, 08:38 AM
  3. Password Protect various levels of user entry
    By nickmax1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-05-2013, 06:16 PM
  4. Replies: 4
    Last Post: 10-20-2012, 07:41 PM
  5. need a macros for user entry to pull a value from another sheet
    By myjebay1 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-06-2012, 08:01 AM
  6. As user fills out data sheet, then fill out a results sheet based on data sheet entry
    By clemsoncooz in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-13-2012, 03:57 PM
  7. User Box entry Pasted into cells
    By humboldtguy in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-21-2010, 04:33 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