|
-
Dec 4th, 2000, 09:58 AM
#1
Thread Starter
Member
Hello,
Currently i have created an Excel file and it is constantly updating the data. So i need to save the file automatically without constantly prompting me whether i want to overwrite the file or not.. Pls help.
The command i currently used is
"workbooks("c:\temp.xls").save"
-
Dec 4th, 2000, 10:39 AM
#2
Junior Member
Code:
Workbooks.Open FileName:="C:\MyFile.xls"
Workbooks.Application.Visible = False
'Update your Data
Workbooks.Application.ActiveWorkbook.Save
Workbooks.Application.Quit
Workbooks.Application.DisplayAlerts = False
Hope this helps!
-
Dec 4th, 2000, 03:03 PM
#3
Addicted Member
Hi cassandra !!!
example below is for EXCEL VBA.
Code:
Workbooks.Open FileName:="C:\MyFile.xls"
'Update your Data
'turn off warnings
Application.DisplayAlerts = False
'save the activeworkbook
ActiveWorkbook.Save
'turn on warnings
'if another Workbook is not save that we get again a
'saving message
Application.DisplayAlerts = True
Application.Quit
-cu TheOnly
PS: if you need the example in VB pls reply
-
Dec 4th, 2000, 10:33 PM
#4
Thread Starter
Member
Thanks for replying .. BTW i found out that only when i leave the excel file open then it will constantly prompt me whether i want to overwrite the existing file or not... I have tried with and without the commands it makes no difference so long i don't open the file it will not prompt me anymore.
'Workbooks.Application.Visible = False'
'Workbooks.Application.DisplayAlerts = False'
But the rest of the commands really works.. Thanks again.
-
Dec 5th, 2000, 01:04 AM
#5
Conquistador
ActiveWorkbook.Save should not prompt to overwrite though?
provided that the workbook has already been saved...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|