View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
damorrison damorrison is offline
external usenet poster
 
Posts: 91
Default Making a sound on condition of textbox

How can I get this code to work without having to select the object??

Private Sub TextBox1_Change()
If TextBox1 24 Then
ActiveSheet.Shapes("Object 3").Select
Selection.Verb Verb:=xlPrimary
Range("F1").Select
End If

End Sub

I tried this but no such luck

Private Sub TextBox1_Change()
Dim Object As Object
If TextBox1 24 Then
With Object("Object 3")
Application.Verb Verb:=xlPrimary
End With
End If
End Sub



This object is a sound I inserted, using insert object