How to make my combox invisible?

Mientje08

New Member
Joined
Dec 4, 2018
Messages
2
Hello,

I am struggling with the code to make my combobox appear and disappear.

I want to make my combobox appear when N= 1.
For all other cases It has to be disappeared.

I have made my code like this:

Private Sub Combobox_visible()
If Range("N6").Value = 1 Then
ComboBox1.Visible = True
Else
ComboBox1.Visible = False
End If
End If
End Sub


But it doesn't work, itstays visible all the time. Can someone please help me???
I cant upload my excel here?
Thank you!!
 

Excel Facts

Which came first: VisiCalc or Lotus 1-2-3?
Dan Bricklin and Bob Frankston debuted VisiCalc in 1979 as a Visible Calculator. Lotus 1-2-3 debuted in the early 1980's, from Mitch Kapor.
What about ?

Code:
[COLOR=#333333]Sub goaway()
[/COLOR][COLOR=#333333]If Range("N6").Value = 1 Then[/COLOR]   
ActiveSheet.Shapes("Drop Down 1").Visible = True
else
ActiveSheet.Shapes("Drop Down 1").Visible = False 
End if
[COLOR=#333333]End Sub[/COLOR]

Note: if you drow a combo on a sheet, when you click it, you have its name on top left, which by default is Drop Down 1. ComboBox1 is for ActiveX and Userforms

You can share a workbook using onedrive and paste a link
 
Last edited:
Upvote 0
What about ?

Code:
[COLOR=#333333]Sub goaway()
[/COLOR][COLOR=#333333]If Range("N6").Value = 1 Then[/COLOR]   
ActiveSheet.Shapes("Drop Down 1").Visible = True
else
ActiveSheet.Shapes("Drop Down 1").Visible = False 
End if
[COLOR=#333333]End Sub[/COLOR]

Note: if you drow a combo on a sheet, when you click it, you have its name on top left, which by default is Drop Down 1. ComboBox1 is for ActiveX and Userforms

You can share a workbook using onedrive and paste a link



This is the link of thefile :
https://michelingroup-my.sharepoint...4-806a-493e-8ecd-93006c1854d0}&action=default
 
Upvote 0
Welcome to the forum.

Please take a minute to read the forum rules, especially regarding cross-posting, and then add links here to your posts in other forums. Thanks.
 
Upvote 0

Forum statistics

Threads
1,215,156
Messages
6,123,339
Members
449,098
Latest member
thnirmitha

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