+ Reply to Thread
Results 1 to 7 of 7

Combo box???

  1. #1
    Registered User
    Join Date
    10-19-2004
    Posts
    79

    Combo box???

    Hi all
    I´ve made macros for the first 4 months ene - abr
    I´m working with a spanish version of excel which I think is making it more difficult
    I´ve tried to fit in to the formulas various ways to try and get it to work but i´ve had no success... My knowledge is zero regarding VB and I have no help files in English...
    Find below the 4 macros that ive made
    I cannot get them to work individually with the combo box
    Can you please help!!!
    Thanks
    legepe

    Sub enemacro()
    '
    ' enemacro Macro
    ' Macro grabada el 23/07/2006 por Leigh Pender
    '

    '
    Sheets("GAN-ENE").Select
    End Sub
    Sub febmacro()
    '
    ' febmacro Macro
    ' Macro grabada el 23/07/2006 por Leigh Pender
    '

    '
    Sheets("GAN-FEB").Select
    End Sub
    Sub marmacro()
    '
    ' marmacro Macro
    ' Macro grabada el 23/07/2006 por Leigh Pender
    '

    '
    Sheets("GAN-MAR").Select
    End Sub
    Sub abrmacro()
    '
    ' abrmacro Macro
    ' Macro grabada el 23/07/2006 por Leigh Pender
    '

    '
    Sheets("GAN-ABR").Select
    Range("A12:W13").Select
    Range("W12").Activate
    End Sub

  2. #2
    Bob Phillips
    Guest

    Re: Combo box???

    How do those 4 macros get invoked? Are you testing the value selected in the
    combo and then calling accordingly? Is the combo a forms combo, userform or
    controls toolbox?

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "legepe" <[email protected]> wrote in
    message news:[email protected]...
    >
    > Hi all
    > I´ve made macros for the first 4 months ene - abr
    > I´m working with a spanish version of excel which I think is making it
    > more difficult
    > I´ve tried to fit in to the formulas various ways to try and get it to
    > work but i´ve had no success... My knowledge is zero regarding VB and I
    > have no help files in English...
    > Find below the 4 macros that ive made
    > I cannot get them to work individually with the combo box
    > Can you please help!!!
    > Thanks
    > legepe
    >
    > Sub enemacro()
    > '
    > ' enemacro Macro
    > ' Macro grabada el 23/07/2006 por Leigh Pender
    > '
    >
    > '
    > Sheets("GAN-ENE").Select
    > End Sub
    > Sub febmacro()
    > '
    > ' febmacro Macro
    > ' Macro grabada el 23/07/2006 por Leigh Pender
    > '
    >
    > '
    > Sheets("GAN-FEB").Select
    > End Sub
    > Sub marmacro()
    > '
    > ' marmacro Macro
    > ' Macro grabada el 23/07/2006 por Leigh Pender
    > '
    >
    > '
    > Sheets("GAN-MAR").Select
    > End Sub
    > Sub abrmacro()
    > '
    > ' abrmacro Macro
    > ' Macro grabada el 23/07/2006 por Leigh Pender
    > '
    >
    > '
    > Sheets("GAN-ABR").Select
    > Range("A12:W13").Select
    > Range("W12").Activate
    > End Sub
    >
    >
    > --
    > legepe
    > ------------------------------------------------------------------------
    > legepe's Profile:

    http://www.excelforum.com/member.php...o&userid=15485
    > View this thread: http://www.excelforum.com/showthread...hreadid=564109
    >




  3. #3
    Registered User
    Join Date
    10-19-2004
    Posts
    79
    I am not sure?
    The 4 macros were made using the standard tools in excel
    The "combo box" just says in excel - cuadro combinado, apart from that I´m not sure???
    To assign macros to one of the titles in the list with the combo box - Is there not a way to do this using the excel standard tools? Or do I need to know how to write in VB?
    Any help to put me in the right direction would be very much appreciated
    Thanks
    legepe

  4. #4
    Bob Phillips
    Guest

    Re: Combo box???

    I think you should add a combobox from the Forms toolbar.

    Then link the combo to a cell (right-click it, select Format Control, on the
    Control tab set the Cell link to a cell, say A1 for example)

    Then assign your c ombobox to the macro below

    Sub GotoMacro()
    Dim sSelected As String
    With ActiveSheet
    sSelected =
    Application.Index(.Range(.DropDowns(Application.Caller).ListFillRange), _
    .Range(.DropDowns(Application.Caller).LinkedCell).Value)
    Worksheets(sSelected).Activate
    End With
    End Sub


    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "legepe" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I am not sure?
    > The 4 macros were made using the standard tools in excel
    > The "combo box" just says in excel - cuadro combinado, apart from that
    > I´m not sure???
    > To assign macros to one of the titles in the list with the combo box -
    > Is there not a way to do this using the excel standard tools? Or do I
    > need to know how to write in VB?
    > Any help to put me in the right direction would be very much
    > appreciated
    > Thanks
    > legepe
    >
    >
    > --
    > legepe
    > ------------------------------------------------------------------------
    > legepe's Profile:

    http://www.excelforum.com/member.php...o&userid=15485
    > View this thread: http://www.excelforum.com/showthread...hreadid=564109
    >




  5. #5
    Registered User
    Join Date
    10-19-2004
    Posts
    79
    How do I assign the macro to the combobox & do I need to make any changes to your formula?
    Thanks
    legepe

  6. #6
    Registered User
    Join Date
    10-19-2004
    Posts
    79
    I meant combobox to macro, not sure if there´s a difference

  7. #7
    Bob Phillips
    Guest

    Re: Combo box???

    What you need to do is right-click the combobox, and select Assign Macro
    from the menu. Then just select the correct one from the list.

    --
    HTH

    Bob Phillips

    (replace somewhere in email address with gmail if mailing direct)

    "legepe" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I meant combobox to macro, not sure if there´s a difference
    >
    >
    > --
    > legepe
    > ------------------------------------------------------------------------
    > legepe's Profile:

    http://www.excelforum.com/member.php...o&userid=15485
    > View this thread: http://www.excelforum.com/showthread...hreadid=564109
    >




+ 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