Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disappearing Callout

Status
Not open for further replies.

edwardpestian

Technical User
Apr 28, 2006
47
US
I have several Callouts on a sheet explaining to the user what data to place in a specific cell. What I'd like to happen is that once the user enters the data into the specific cell for the callout to disappear.

Thanks in Advance.

EP
 
EP,

Place the following code in the code module of the worksheet where your input cells & Callouts are. You will need to change/add the addresses for your particular case. Also, it is essential that the actual Callout names and those in the code match.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CalloutName As String
   
   Select Case Target.Address
   Case "$B$6"
     CalloutName = "Callout_1"
   Case "$B$10"
     CalloutName = "Callout_2"
   Case Else
     Exit Sub
   End Select
   
   Me.Shapes(CalloutName).Visible = (Target.Value = "")
        
End Sub


Regards,
Mike
 
The code is not working. The lines with an asteric are highlighted in red. Any ideas?

Private Sub Worksheet_Change(ByVal Target As Range)

Dim CalloutName As String
   
   *Select Case Target.Address
   Case "$F$5"
     CalloutName = "Callout_1"
   Case "$E$6"
     CalloutName = "Callout_2"
   *Case Else
     *Exit Sub
   *End Select
   
   Me.Shapes(CalloutName).Visible = (Target.Value = "")
        
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top