+ Reply to Thread
Results 1 to 3 of 3

Overwrite existing workbook without prompting

Hybrid View

Cumberland Overwrite existing workbook... 03-22-2007, 11:21 AM
antoka05 Try so: Sub Macro1() ... 03-22-2007, 11:39 AM
Cumberland Thanks Antonio, that's solved... 03-22-2007, 12:23 PM
  1. #1
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try so:

    Sub Macro1()
       ExistFile = Dir(FileToSave)
       If ExistFile <> "" Then
          Kill FileToSave
       End If
    
       'Then save file    
       ThisWorkbook.SaveAs (FileToSave)
    End Sub
    Regards,
    Antonio

  2. #2
    Forum Contributor
    Join Date
    04-13-2006
    Location
    London
    Posts
    102

    Talking

    Thanks Antonio, that's solved it perfectly!

+ 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