Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Pat try this routine:
Sub RevertFile() wkname = ActiveWorkbook.path & "\" & ActiveWorkbook.Name ActiveWorkbook.Close savechanges:=False Workbooks.Open FileName:=wkname End Sub It will revert the file to the last saved change. Greg "K Dales" wrote in message ... The Open method requires a filename parameter, and by specifying "" you are not giving it a file to open. Application.RecentFiles(1).Open should open the last workbook used. But this seems to me to be an awkward method of "undoing" changes. If possible, I would create a copy of the invoice (before changes), hide it, and then have a routine that restores it. "Pat" wrote: I want to have the ability to abandon an invoice and return it to its former state. I thought if I closed the workbook without saving it and then reopen it this would do the trick. I ran the following code but the workbook did not open. Application.DisplayAlerts = False ActiveWorkbook.Close Workbooks.Open Filename:=" " Application.DisplayAlerts = True Apart from just simply manually closing/reopening the workbook has anyone got another method I should consider? Ta |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
invoice toolbar for invoice calcuation and assign number | Excel Discussion (Misc queries) | |||
missing invoice toolbar when save customised invoice | New Users to Excel | |||
Invoice templet Excel97 to 2003 invoice toolbar missing | Excel Discussion (Misc queries) | |||
How do I display the invoice toolbar for unique invoice #'s? | Excel Discussion (Misc queries) | |||
How do I change the invoice number assigned in Invoice template... | Excel Discussion (Misc queries) |