+ Reply to Thread
Results 1 to 2 of 2

saving auto replace

  1. #1
    Registered User
    Join Date
    02-15-2007
    Location
    Inverness, UK
    Posts
    95

    saving auto replace

    Hi there 2 quick questions on saving.....

    1) whats the VBA code so it will save and automatically replace?

    2) Whats the VBA code so as it will not ask to save when you close the file?



    ooo and also sorry whats the code so as i can close the whole of excel and not just the worksheet?

    if it helps i am working in version 2000 thanks

    simon

  2. #2
    Registered User
    Join Date
    04-24-2007
    Posts
    5
    You could try this as an answer to your first question:

    If Dir(SaveFile) <> "" Then
    ActiveWorkbook.Save
    Else
    ActiveWorkbook.SaveAs (SaveFile)
    End If

    If the file exists it uses the Save command, if the file does not exist it uses the SaveAs command with the name of the file.

    An answer to your second question is something I am also looking for, so I can not help you there. Sorry.

    DeMus

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1