tonywatsonhelp
Well-known Member
- Joined
- Feb 24, 2014
- Messages
- 3,194
- Office Version
- 365
- 2019
- 2016
- Platform
- Windows
Hi everyone,
I was advised that as I wanted to position the messagebox in the top right of the screen I should use a userform instead,
I've created the userform (just called userform1) with two boxes yes / no but I don't know how to get it to replace my message box?
can someone please help me? what code do I use to get the same results but with my userform instead of the message box?
the code is:
the code is placed in sheet2 and activates when I doubleclick a website in a cell.
Thanks
Tony
I was advised that as I wanted to position the messagebox in the top right of the screen I should use a userform instead,
I've created the userform (just called userform1) with two boxes yes / no but I don't know how to get it to replace my message box?
can someone please help me? what code do I use to get the same results but with my userform instead of the message box?
the code is:
Code:
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
Dim answer
answer = MsgBox("Is This a Good Site?", vbYesNo + vbQuestion, "Empty Sheet")
If answer = vbYes Then
ActiveCell.Offset(0, 1) = "Good site"
ActiveCell.Offset(0, 1).Select
answer = ""
End If
End Sub
Thanks
Tony