![]()
Dim vbResponse As VbMsgBoxResult vbRepsonse = MsgBox("Are you sure that you would like to clear the contents of the range?", vbYesNo, "Clear?") If vbResponse = vbYes Then Range("C7:E91").ClearContents Else Exit Sub End If
![]()
Dim vbResponse As VbMsgBoxResult vbRepsonse = MsgBox("Are you sure that you would like to clear the contents of the range?", vbYesNo, "Clear?") If vbResponse = vbYes Then Range("C7:E91").ClearContents Else Exit Sub End If
Perhaps it was the Noid who should have avoided me...
If you are satisfied with my solution click the small star icon on the left. Thanks
1. Make a copy of your workbook and run the following code on your copy (just in case)
2. With excel open, press ALT+F11 to open the Visual Basic Editor (VBE). From the "Insert" menu, select "Module".
3. Paste the code from above into the empty white space. Close the VBE.
4. From the developer tab, choose "Macros", select the Sub Name, and click "Run".
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks