Help with Label

D

Den

I need a macro or code that show or hidden a Label box when a condition in a
cell X is true or false.

A will appreciate any help from you
 
L

Luke M

'Right click on sheet tab, view code, copy and modify to suit:

Private Sub Worksheet_Calculate()
Me.Shapes("Label 1").Visible = Range("A1").Value
End Sub
 
D

Den

Sorry but I’m not very familiarized with visual basic so I will try to be
more clear. Basically I have a cell with a macro that shows “Meets†or “Does
not Meets†depending of the result of other cell. That I’m trying to do is a
macro or visual basic code that display a Label box when “Meets†is showed
and hidden it when “Does not Meet†is showed

Again I will appreciate any help from you
 
L

Luke M

You will need to find the name of the label (sleect label, look at the name
box) and define this in the macro. To install, right click on sheet tab,
view code, paste in.

Private Sub Worksheet_Calculate()
If Range("A1").Value = "Meets" then
Me.Shapes("Label 1").Visible = True
Else
Me.Shapes("Label 1").Visible = False
End If
End Sub
 

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

Top