Combo box???

  • Thread starter Thread starter legepe
  • Start date Start date
L

legepe

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 i
more difficult
I´ve tried to fit in to the formulas various ways to try and get it t
work but i´ve had no success... My knowledge is zero regarding VB and
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 Su
 
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)
 
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
 
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)
 
How do I assign the macro to the combobox & do I need to make any
changes to your formula?
Thanks
legepe
 
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)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top