Hi - I have written a very simple macro that just clears the contents of a sheet from cell A5 to AC5 all the way down to cell A1000 to AC1000. However, since creating the macro, i have realised that it would probably be beneficial to put a warning box within the macro to ask the user, if they are sure they want to clear the contents of sheet.
I am new to VBA code and although i have found various website showing me how to create message boxes I am not confident in where that particularr code should be placed and if i need to change any of the drop down options within the VBA editor for the afroementioned drop down box.
As the data on the sheet is important and obviously with one click it could all be rid off, i need to safeguard the deletion of this data.
All the warning message really needs to say is "Are you sure you want to delete the data within this sheet? with a 'Yes' or 'No' as the two options provided.
Perhaps followed by another message box requesting that the user then save the new workbook in a pre-determined location with a different file name.
Any ideas are gratefully accepted.
Many thanks
Rich
I am new to VBA code and although i have found various website showing me how to create message boxes I am not confident in where that particularr code should be placed and if i need to change any of the drop down options within the VBA editor for the afroementioned drop down box.
As the data on the sheet is important and obviously with one click it could all be rid off, i need to safeguard the deletion of this data.
All the warning message really needs to say is "Are you sure you want to delete the data within this sheet? with a 'Yes' or 'No' as the two options provided.
Perhaps followed by another message box requesting that the user then save the new workbook in a pre-determined location with a different file name.
Any ideas are gratefully accepted.
Many thanks
Rich
Last edited: