Creating a combobox combined with macro in Excel 2000

danground

New Member
Joined
Oct 11, 2006
Messages
1
:oops: This is too hard for me so i'll ask you and we.ll see if anyone can help me. I want to create a combobox with the values 00-99 which is linked to several, actually, a hundred macros that i've created. How do i make this work? I suck at VB so someone's got to help me out!

And by the way, for me that's using a swedish version, can aqnyone explain what the sheet is. Is it the curretn file, or "book" your working on, or is it the currrent page? :rolleyes:

Take care!

/Dan
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
In row 1 of a spare column enter this formula:

=TEXT(ROW(A1)-ROW(A$1),"00")

and copy it to rows 2 to 100. Name that range eg List using Insert|Name|Define.

Right click any Toolbar and choose Control Toolbox. Click the ComboBox icon and click and drag in your worksheet to position and size it. Right click the ComboBox and choose Properties. Against the ListFillRange property type List and close the Properties window. Right click the ComboBox and choose View Code. Paste this into the window on the right (overwriting what's already there):

Code:
Private Sub ComboBox1_Change()
    Application.Run "Macro" & ComboBox1.Value
End Sub

The code assumes that your macros are named Macro00 thru Macro99. Adjust to suit.

Press Alt+F11 to return to your worksheet and click the Design icon at top left of the Control Toolbox to exit design mode.

Try it out by selecting an item from the ComboBox.

A workbook is a file on disk, eg Book1.xls. A worksheet is a page within a workbook, eg Sheet1.
 

Forum statistics

Threads
1,141,914
Messages
5,709,313
Members
421,627
Latest member
bennhrios9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top