Access an Active X scrollbar programatically

Posted on 2009-12-17
Last Modified: 2012-05-08
I have an ActiveX control (scrollbar) on a worksheet.  I want to reference it and set it's properties in my open.

shouldn't I be able to:

dim w as worksheet
Set w = Worksheets("DTDASH")

w.scroll1.max = ##

what am I not doing.

tnx experts
Question by:skillilea
    1 Comment
    LVL 81

    Accepted Solution

    Use the following technique to obtain the scroll bar control object:

       Dim TargetLabel As msForms.ScrollBar
       Set TargetLabel = Sheets("DTDASH").Shapes("ScrollBar1").OLEFormat.Object.Object


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
    Sparklines have been introduced with Excel 2010 and are a useful tool for creating small in-cell charts, used for example in dashboards. Excel 2010 offers three different types of Sparklines: Line, Column and Win/Loss. What it does not offer is a…
    This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
    This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.

    737 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    18 Experts available now in Live!

    Get 1:1 Help Now