+ Reply to Thread
Results 1 to 3 of 3

Save file as specified cell

  1. #1
    Registered User
    Join Date
    01-29-2015
    Location
    Pittsburgh, PA
    MS-Off Ver
    2010
    Posts
    2

    Save file as specified cell

    Let me first start by saying I am a complete amateur when it comes to writing macros. I have recorded a few, but mostly have just gathered what I have seen posted on other forums to compile what I hoped would work. It hasn't!

    Specifically I want my operators to input today's date into a desired cell as specified, following the input I want the file to saveas the input date in a specified folder. Below is my best attempt to accomplish this task, I appreciate any help you can provide.

    ___________

    Private Sub SaveAs(ByVal target As Range)
    Dim cell As Range
    Dim fPath As String
    Dim fName As String

    Application.EnableEvents = False

    fName = Range("L1").Text
    fPath = Range("L1").Text
    If Right(fPath, 1) <> "/" Then
    fPath = fPath & "/" & Format([L1], "MMMMYYYY") & "/"
    ThisWorkbook.SaveAs (fPath & fName & ".xlsm")

    End If
    Next cell
    Application.EnableEvents = True

    End Sub

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Save file as specified cell

    Is there a specific time when this *Event* is supposed to occur?

    When the book first opens, when the user attempts to save, when the user attempts to close, whenever cell A1 is change?
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Registered User
    Join Date
    01-29-2015
    Location
    Pittsburgh, PA
    MS-Off Ver
    2010
    Posts
    2

    Re: Save file as specified cell

    Yes, when I click on a button with a macro that saves the file as today's date.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 0
    Last Post: 03-11-2014, 08:18 AM
  2. Replies: 1
    Last Post: 08-16-2013, 04:23 AM
  3. [SOLVED] Copy row from active file to another formated excell file and save as one cell value
    By snsuvarna in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2013, 04:18 AM
  4. [SOLVED] macro to save file to specific folder with file name from cell reference
    By mezza89 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-06-2013, 11:32 AM
  5. How to click "SAVE" to save a new file with file name derived from a cell?
    By vettenfun in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 09-29-2011, 12:21 PM

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