Results 1 to 5 of 5

Issue with automatically saving a file to a folder on my desktop

Threaded View

pcm034 Issue with automatically... 02-28-2013, 09:03 PM
xladept Re: Issue with automatically... 02-28-2013, 09:20 PM
pcm034 Re: Issue with automatically... 02-28-2013, 09:27 PM
pcm034 Re: Issue with automatically... 02-28-2013, 09:40 PM
xladept Re: Issue with automatically... 03-01-2013, 01:39 PM
  1. #5
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Issue with automatically saving a file to a folder on my desktop

    Hi pcm,

    This is how I'd insert the helpfile code:

    ElseIf Application.Caller = "SaveAsExcelButton" Then
        Dim Fname As String, Newbook As Workbook
        MsgBox "Where would you like to save the Excel Backup of this Quote", vbOKOnly + vbExclamation, "Backup Quote"
        Do: Fname = Application.GetSaveAsFilename
                      Loop Until Fname <> False
                      Newbook.SaveAs Filename:=Fname
        If Application.Dialogs(xlDialogSaveAs).Show(, , vbNullString) Then
            MsgBox "Your Excel File Has Been Saved", vbExclamation, "Backup Quote"
        Else
            MsgBox "YOU DID NOT SAVE A BACKUP!!", vbOKOnly + vbCritical, "Try Again"
        End If
    But if you want B13 & B17 to be the filename:

    Fname=Sheets(2).Range("B13") & Sheets(2).Range("B17")
    ActiveWorkbook.SaveAs Filename:=Fname
    And, you'd probably want to close it so that you'd be back in the one you backed up.

    ActiveWorkbook.Close
    Last edited by xladept; 03-01-2013 at 02:06 PM.

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