+ Reply to Thread
Results 1 to 4 of 4

Drop List Zoom Program Not Working

Hybrid View

  1. #1
    Registered User
    Join Date
    06-05-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    33

    Drop List Zoom Program Not Working

    I've tried using all the formulas from: http://www.contextures.com/xlDataVal08.html
    and they will not work. I can't figure out why.
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Drop List Zoom Program Not Working

    Your code has a Reference error

    =ROUND(IF(AND(OR(ISBLANK(C5),ISBLANK(C4),ISBLANK(C3),ISBLANK(#REF!))),"",C5-C4),4)
    Select the field where the #REF should be pointing to.

    You could use the below calculation to produce a zero, if field B5 or C5 is blank/empty

    =IFERROR(ROUND(IF(AND(OR(ISBLANK(B5),ISBLANK(B4),ISBLANK(B3))),"",B5-B4),4),0)
    Or use the below calculation to show nothing/blank field, if field B5 or C5 is blank/empty

    =IFERROR(ROUND(IF(AND(OR(ISBLANK(B5),ISBLANK(B4),ISBLANK(B3))),"",B5-B4),4),"")
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    06-05-2017
    Location
    US
    MS-Off Ver
    2013
    Posts
    33

    Re: Drop List Zoom Program Not Working

    Thanks for the reply that was actually the next issue I needed to address! Also for my original issue in the formula:

    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    If Target.Cells.Count > 1 Then Exit Sub
    If Intersect(Target, Range("A1,B3,D9")) Is Nothing Then
    ActiveWindow.Zoom = 100
    Else
    ActiveWindow.Zoom = 120
    End If
    End Sub

    Is there anyway to set the ActiveWindow.Zoom for non drop listed cells to where it doesn't zoom at all?
    Last edited by pahickham; 06-16-2017 at 09:02 AM.

  4. #4
    Valued Forum Contributor
    Join Date
    12-01-2016
    Location
    Planet Earth
    MS-Off Ver
    95 - 2016
    Posts
    343

    Re: Drop List Zoom Program Not Working

    Still a work in progress but here what I found to work thus far. With a little code manipulation, the code could actually do what you want.

    * You must select an empty cell to reset the zooming

    Source: https://www.youtube.com/watch?v=r65mICOUQcA

    There are 3 codes

    Code #1:
    Private Sub Worksheet_SelectionChange(ByVal Target As Range)
    Zoom_Cells
    End Sub
    Code #2:
    Sub Zoom_Cells()
      Dim sel As Range, cell As Range, zoom_in As Single
        Set sel = Selection
        zoom_in = 1.25  'Zoom rate
        
        For Each cell In Selection 'if there are blank cells in selection, shapes are deleted and ended method
          If cell.Value = Empty Then
          Call remove_picture
          GoTo here:
          Exit Sub
          End If
        Next
        
        Call remove_picture  'Remove any existing zoom piture
          Application.ScreenUpdating = False
          sel.CopyPicture Appearance:=xlScreen, Format:=xlPicture 'Create zoom picture
          ActiveSheet.Pictures.Paste.Select
            With Selection
             .Name = "Zoom_Cells"
               With .ShapeRange
                .ScaleWidth zoom_in, msoFasle, msoScaleFromTopLeft
                .ScaleHeight zoom_in, msoScaleFromTopLeft
                  With .Fill
                   .ForeColor.SchemeColor = 44
                   .Visible = msoTrue
                   .Solid
                   .Transparency = 0
                  End With
               End With
            End With
    here:
        sel.Select
        Application.ScreenUpdating = True
        Set sel = Nothing
    End Sub
    Code #3:
    Sub remove_picture()
     Dim k As Object
       For Each k In ActiveSheet.Pictures
         If k.Name = "Zoom_Cells" Then
          k.Delete
         End If
       Next
    End Sub
    Attached Files Attached Files

+ 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. Drop List Program not working.
    By pahickham in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-14-2017, 02:42 PM
  2. drop down list not working
    By hek in forum Excel General
    Replies: 4
    Last Post: 03-05-2016, 03:44 AM
  3. drop down list not working as it should
    By K-Ching in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2015, 02:59 AM
  4. dependent drop down list not working as it should
    By K-Ching in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-22-2015, 02:58 AM
  5. Indirect drop down list not working
    By Narelles in forum Excel General
    Replies: 3
    Last Post: 12-18-2013, 09:16 PM
  6. Pagesetup Zoom not working with variable
    By djblois1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-09-2013, 11:06 AM
  7. Protection not working on Combo Box drop down list
    By blu_eyed_jen in forum Excel General
    Replies: 1
    Last Post: 06-26-2008, 05:47 AM

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