LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Abandon invoice

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
invoice toolbar for invoice calcuation and assign number KarenY Excel Discussion (Misc queries) 15 March 16th 07 12:02 PM
missing invoice toolbar when save customised invoice M.G New Users to Excel 1 September 26th 05 07:18 AM
Invoice templet Excel97 to 2003 invoice toolbar missing MarolynInMarion Excel Discussion (Misc queries) 0 August 19th 05 07:15 PM
How do I display the invoice toolbar for unique invoice #'s? QueenZoie Excel Discussion (Misc queries) 1 July 15th 05 05:34 PM
How do I change the invoice number assigned in Invoice template... akress Excel Discussion (Misc queries) 1 February 28th 05 06:36 PM


All times are GMT +1. The time now is 07:15 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"