Macros and combo boxes

Weinreja

New Member
Joined
Apr 15, 2002
Messages
1
I used to use macros but its been awhile and I have forgotten the basics. Can anyone tell me the code for a basic combo box?
Thanks for your help!
Jill
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
I used to use macros but its been awhile and I have forgotten the basics. Can anyone tell me the code for a basic combo box?

I believe that combo boxes can only be placed on userforms. You have to design the userform and create code to load and display the form. I don't think a combobox can be brought up any other way.
 
Upvote 0
You can add a combo box to a spreadsheet without using a user form. You can select it from the Visual Basic menu. If you right click on the top menu, you can select it here, or go to VIEW-TOOLBARS and select VISUAL BASIC. Here is a macro that you can adjust and use that will add a combo box:

Sub AddBox()

ActiveSheet.OLEObjects.Add(ClassType:="Forms.ComboBox.1", Link:=False, _
DisplayAsIcon:=False, Left:=240.75, Top:=65.25, Width:=94.5, Height:= _
12.75).Select
Application.CommandBars("Control Toolbox").Visible = False
End Sub
This message was edited by Scott on 2002-04-16 15:03
 
Upvote 0

Forum statistics

Threads
1,214,622
Messages
6,120,576
Members
448,972
Latest member
Shantanu2024

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
Back
Top