Results 1 to 5 of 5

Thread: Saving Excel File

  1. #1

    Thread Starter
    Member
    Join Date
    Nov 2000
    Posts
    36

    Unhappy

    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"

  2. #2
    Junior Member
    Join Date
    Oct 2000
    Posts
    18
    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!

  3. #3
    Addicted Member
    Join Date
    Oct 2000
    Location
    Vienna/Austria
    Posts
    132
    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

  4. #4

    Thread Starter
    Member
    Join Date
    Nov 2000
    Posts
    36

    Unhappy

    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.

  5. #5
    Conquistador
    Join Date
    Dec 1999
    Location
    Australia
    Posts
    4,527
    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
  •  



Click Here to Expand Forum to Full Width