Private Sub Cmd_AgentPin_Search_Click()
If Sheets("Call_List").AutoFilterMode = True Then Sheets("Call_List").AutoFilterMode = False
Names.Add Name:="Filter_Area", RefersToR1C1:="=Call_List!R1C1:R65536C10"
With Range("Filter_Area").Resize(, 10)
.AutoFilter Field:=4, Criteria1:=Me.txt_AgentPin.Value
End With
Sheets("Data").Cells.ClearContents
Sheets("Call_List").Range("A1").CurrentRegion.Copy
Sheets("Data").Select
Range("a1").Select
ActiveSheet.Paste
Me.txt_Call1_Link.Value = ThisWorkbook.Sheets("Data").Range("I2").Value
Me.txt_Call2_Link.Value = ThisWorkbook.Sheets("Data").Range("I3").Value
End Sub
Private Sub Cmd_Call1_Play_Click()
Link = Me.txt_Call1_Link.Value
'On Error GoTo NoCanDo
ActiveWorkbook.FollowHyperlink Address:=Link, NewWindow:=True
Unload Me
'Exit Sub
'NoCanDo:
'MsgBox "Cannot open " & Link
End Sub
Private Sub Cmd_Call2_Play_Click()
Link = Me.txt_Call2_Link.Value
'On Error GoTo NoCanDo
ActiveWorkbook.FollowHyperlink Address:=Link, NewWindow:=True
Unload Me
'Exit Sub
'NoCanDo:
'MsgBox "Cannot open " & Link
End Sub
this code works fine until Private Sub Cmd_Call1_Play_Click or Private Sub Cmd_Call2_Play_Click. When I click the play button, it closes the user form and opens the link, i need the user form to always stay visible.
Can anyone help