Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
If you want to copy the sheet you need to copy it to a new workbook first,
then save that new workbook. If you follow those steps in Excel with the macro recorder on you should get the code that you need. When you say delete the application, I presume that you mean the workbook. Check out Kill in VBA help. -- HTH RP (remove nothere from the email address if mailing direct) "Michael" wrote in message ... 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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Application.GetOpenFilename vs Application.Dialogs(xlDialogsOpen) | Excel Programming | |||
Replace application.RTD property by Application.RTDServers collect | Excel Programming | |||
macro to close excel application other than application.quit | Excel Programming | |||
application. ... | Excel Programming | |||
application.quit will not shut off application | Excel Programming |