Results 1 to 6 of 6

Hiding a ScrollBar

Threaded View

  1. #1
    Forum Expert Mordred's Avatar
    Join Date
    07-06-2010
    Location
    Winnipeg, Canada
    MS-Off Ver
    2007, 2010
    Posts
    2,787

    Hiding a ScrollBar

    Hi all,

    I am trying to fine tune a charting tool but Excel is acting odd, or I am odd, or both . Whatever the case may be, if you fill the charts with data using the buttons, click the top chart to zoom the view size, use the scroll bar, and then click the top chart again to zoom the view size back to 75, the scroll bar will not hide (unless you click the chart again, and then again).
    Within the module ChartClick, I have the following code:
    Dim scrBar1 As Shape, scrBar2 As Shape
    Set scrBar1 = ActiveSheet.Shapes("ScrollBar1")
    Set scrBar2 = ActiveSheet.Shapes("ScrollBar2")
    '---The first if statement expands the view size---'
        If ActiveWindow.Zoom = 75 And ActiveWindow.Zoom < 100 Then
            Application.DisplayFullScreen = True
            ActiveWindow.Zoom = 100
            Application.Goto Sheets("Sheet2").Range("A3"), True
            HideCansim
            scrBar1.Visible = msoFalse
            scrBar2.Visible = msoTrue
            RadioButton_Explode
            Help_Explode
            With Range("M12:M16")
                .Font.ColorIndex = 0
                .Font.Size = 14
            End With
            Range("G12").Select
            Exit Sub
        End If
    '---The next if statement zoom the viewsize back to 75---'
        If ActiveWindow.Zoom = 100 Then
            Application.DisplayFullScreen = False
            ActiveWindow.Zoom = 75
            Application.Goto Sheets("Sheet2").Range("A1"), True
            UnHideCansim
            scrBar1.Visible = msoTrue
            scrBar2.Visible = msoFalse
            RadioButton_Implode
            Help_Implode
            Range("M12:M16").Font.ColorIndex = 2
            Range("G12").Select
            Exit Sub
        End If
    Does something here look off? Perhaps, while I am thinking about it, is it a sequential code reading issue? I don't know but if someone has an idea, I would love to here it! Thanks so much
    Attached Files Attached Files
    Last edited by Mordred; 02-23-2011 at 12:59 PM.
    If you're happy with someone's help, click that little star at the bottom left of their post to give them Reps.

    ---Keep on Coding in the Free World---

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