Application
Hi.
My excel application is in a network, its a program that help the user to
report different stuff. Because the report number increase automatically the
application is saved with the new report number right after its opened, then
its saved again to another location, but this location should be temporary.
Here is the code i have.
*** First the application is saved back to its original folder with the new
report number.
ReportNumber = ActiveSheet.Range("e5").Value
ReportNumber = ActiveSheet.Range("e5").Value + 1
ActiveSheet.Range("e5").Value = ReportNumber
If Me.Saved = False Then Me.Save
*** Then its saved to a new folder ( and this should be temporary).
FileSaveName = ActiveWorkbook.Path
FileSaveNameEnd = FileSaveName & "\Arkiv\"
varName = ActiveSheet.Name
varDir = FileSaveNameEnd
varYear = Format(Date, "yy")
varNr = ReportNumber
On Error GoTo ErrorHandler:
ActiveSheet.SaveAs Filename:=varDir & varName & varNr & varYear
My question is:
Is it possible to save just the sheet and not the whole application, i dont
want the report to include the macros after it is saved to its right location.
And is there a command to delete the application after the user is done,
-the application that is saved in the temporary folder.
Mike
|