Prev: Rounding up
Next: sorted running balance
From: Den on 18 May 2010 20:37 I need your help to create a macro or a Visual Basic code that do the following: 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. I'm trying a VB code using the if statement to change the visible property (to False and True) of the Label box but is not working. I'm not very familiarized with visual basic and I'm not at the level of skills of many of you so please take that in consideration for any suggestion. Thanks in advance…
From: FSt1 on 18 May 2010 21:37 hi i use a label from the control toolbox for this. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Set Target = Range("A2") '<<<<<change to suit your data If Target.Value = "meets" Then Label1.Visible = True Else Label1.Visible = False End If End Sub this is sheet code. right click the sheet tab and click view code. paste the code in the code pane that comes up. regards FSt1 "Den" wrote: > I need your help to create a macro or a Visual Basic code that do the > following: 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. I'm trying a VB code using the if > statement to change the visible property (to False and True) of the Label > box but is not working. I'm not very familiarized with visual basic and I'm > not at the level of skills of many of you so please take that in > consideration for any suggestion. > > Thanks in advance… >
|
Pages: 1 Prev: Rounding up Next: sorted running balance |