So I wrote a really simple bit of code that would essentially undo the changes done by another macro. The other macro saves the workbook, then copies data to another sheet and deletes the original data. The "Undo" script I've written simply closes and reopens the workbook without saving it - not fool proof I know but it's better than nothing. It runs perfectly fine and does what I want - but when it reopens the workbook I get the following warning message "Cannot run the macro 'OpenMe'. The macro may not be available in this workbook or all macros may be disabled." All my macros still work fine after the reopening. Here's the code I have for the close and open macro:
Sub Yes_Click()
Application.OnTime Now + TimeValue("00:00:01"), "OpenMe"
ThisWorkbook.Close SaveChanges:=False
End Sub
Sub OpenMe()
MsgBox "Changes Undone"
End Sub
Sub No_Click()
Undo.Hide
End Sub
All I want is for this silly warning to not pop up! Any suggestions appreciated :)