Combo box and VB script help

ethernet

New Member
Joined
Sep 25, 2006
Messages
3
Greetings,
I am having problems with a combo box.

I need a Combo Box to Hide or Show colums upon selection.

For Example.

Option 1 -> Hide Column A
Option 2 -> Hide column B
Option 3 -> Show all columns etc etc.

I've been experimenting with the following code to no avail.


Private Sub ComboBox1_Change()
Columns("A:A").Select
Selection.EntireColumn.Hidden = True
End Sub

I'd really appreciate some help.
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.

Forum statistics

Threads
1,203,605
Messages
6,056,268
Members
444,853
Latest member
sam69

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