Results 1 to 9 of 9

Trying to Simplify Saving a file from A template

Threaded View

  1. #1
    Registered User
    Join Date
    06-01-2012
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    6

    Trying to Simplify Saving a file from A template

    I have searched and searched but have not found the answer for what I am trying to do. I have created a template to be used by my employees so they can get a snapshot of their weekly settlement(estimated only) after expenses etc.. are done. I have provide a link to the template(with erroneous dollar amounts) so that can be used for testing. What I am trying to do after lets say Trip Number and Dispatch date have been entered is to click on File>Save As and have the file show up as example: EstPay062511.xls whereas the 062511 would be the date of dispatch plus 7 days without the slashes. I have several things and keep coming up with run time errors or am asked to save the file as a macro embedded file which I do not want. Be advised I am new to using Excel and think I have done a good job on the template and I am just trying to tweak it to make easier for my drivers to use.

    Est_Pay_Test_template.xlt

    Cross Posted:http://www.mrexcel.com/forum/showthread.php?t=639000

    The following is the code I'm trying to use:
    Sub cmd_SaveToC_Drive()
    
    
    Dim strPath As String
    Dim strFolderPath As String
    Dim fileSaveName As Variant
    
    strFolderPath = "C:\Users\Thor\Desktop\Testing Folder\"
    ThisFile = (Sheets("Trip1").Range("B8").Value & "_" & "EstPay" & ".xls")
    
    fileSaveName = Application.GetSaveAsFilename(InitialFileName:=strFolderPath & ThisFile)
    If fileSaveName = False Then Exit Sub
    ThisWorkbook.SaveAs filename:=fileSaveName
    
    End Sub
    Last edited by ThunderGod; 06-10-2012 at 02:57 PM. Reason: Not able to attach template (.xlt) files to post
    Thanks

    Thor

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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