+ Reply to Thread
Results 1 to 3 of 3

activex controls

  1. #1
    Gary
    Guest

    activex controls

    Quite an indepth sheet to sort data using various activex controls such as
    combo box, option / tick box. Problem is when I run a macro and include the
    function of a combo box, the macro does not recognise the box ? Call me
    stupid but it is the control box type, must these contols have their own
    macros assigned inoeder to work ? I have used these as a basis to the sheet
    linking 1000's of calcs.
    PS very urgent as sheet required Mon 16th May.
    Thanks

  2. #2
    Peter T
    Guest

    Re: activex controls

    > Call me stupid but it is the control box type, must these contols have
    their own
    > macros assigned inoeder to work ?


    Morning Stupid, as you ask t.b. referred as :-)

    Not exactly. Unlike controls from the Forms menu to which you do assign a
    macro, those from the Controls Toolbox menu respond to "Events". From this
    menu activate "Design Mode", select your control. right click, view code.

    This should take you into the Sheet module with the Click event ready for
    you to enter your code. Here you can either do your stuff or call a
    procedure in a normal module, eg:

    Private Sub CommandButton1_Click()
    Dim var As Variant
    Dim result As Variant
    var = Range("A1").Value

    result = MyFunc(var) ' MyFunc in a normal module

    Range("B1").Value = result
    End Sub

    You will notice two dropdowns at the top of the module. From the left select
    the name of the control and in the right you can select other Events in
    which you can write your code. Typically you will only need the "Click"
    event.

    Regards,
    Peter T



    "Gary" <[email protected]> wrote in message
    news:[email protected]...
    > Quite an indepth sheet to sort data using various activex controls such as
    > combo box, option / tick box. Problem is when I run a macro and include

    the
    > function of a combo box, the macro does not recognise the box ? Call me
    > stupid but it is the control box type, must these contols have their own
    > macros assigned inoeder to work ? I have used these as a basis to the

    sheet
    > linking 1000's of calcs.
    > PS very urgent as sheet required Mon 16th May.
    > Thanks




  3. #3
    Bob Phillips
    Guest

    Re: activex controls

    Gary,

    You are not clear as to what you are doing and what the controls are for.
    For instance, what does '... and include the function of a combo box ...'
    mean?

    --
    HTH

    Bob Phillips

    "Gary" <[email protected]> wrote in message
    news:[email protected]...
    > Quite an indepth sheet to sort data using various activex controls such as
    > combo box, option / tick box. Problem is when I run a macro and include

    the
    > function of a combo box, the macro does not recognise the box ? Call me
    > stupid but it is the control box type, must these contols have their own
    > macros assigned inoeder to work ? I have used these as a basis to the

    sheet
    > linking 1000's of calcs.
    > PS very urgent as sheet required Mon 16th May.
    > Thanks




+ Reply to Thread

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