Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I used below code to open and fill an Excel file automaically. After that, save it.
However, after I call Workbook.SaveAs(Or Save), when I close the Excel file. I always be asked "The content of this file is changed, do you want to save it? But the content has already been saved indeed Then why that message is showed? How to clear it? Dim ExcelForm As New Excel.Applicatio Dim exwbook As Excel.Workboo Dim exsheet As Excel.Workshee Dim file As New FileInfo("C:\template.xls" If file.Exists = True The file.Delete( End I Dim fs As FileStream = file.Create( fs.Close( ExcelForm = CreateObject("Excel.Application" ExcelForm.Visible = Tru exwbook = ExcelForm.Workbooks.Open("C:\template.xls" exsheet = exwbook.Worksheets("template" exsheet.Cells(1, 1) = ... .. exwbook .SaveAs("C:\template.xls) 'Or exsheet.Save( |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Each time I close an Excel file, it asks if I want to save. | Excel Discussion (Misc queries) | |||
Excel asks to save an unchanged document. Why? | Excel Discussion (Misc queries) | |||
excel 02 always asks "save changes?" when closing unaltered file | Excel Discussion (Misc queries) | |||
why excel 2003 always asks to save or not | Excel Discussion (Misc queries) | |||
System asks to save when no changes made? | Excel Programming |