Thanks Tom.
I changed your code a little. See the completed code below. Thanks for all your help.
Sub ResetScreenResolution(Optional Dummy As Integer)
Dim x As Long
Dim y As Long
Dim MyMessage As String
Dim MyResponse As VbMsgBoxResult
x = Sheets("Sheet3").Range("A1").Value
y = Sheets("Sheet3").Range("A2").Value
MyMessage = "Your current screen resolution was originally " & x & " X " & y & vbCrLf _
& vbCrLf & "Would you like to restore your original screen resolution now (you can change it later if you like)?"
MyResponse = MsgBox(MyMessage, vbExclamation + vbYesNo, "Screen Resolution")
If MyResponse = vbYes Then
Sheets("Sheet3").Range("A1:A2").ClearContents
Call Shell("rundll32.exe shell32.dll,Control_RunDLL desk.cpl,,3")
End If
End Sub
Bookmarks