+ Reply to Thread
Results 1 to 5 of 5

Save file using cell references & mandatory cell input

  1. #1
    Registered User
    Join Date
    02-15-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    15

    Question Save file using cell references & mandatory cell input

    Hello: I am new to the boards and also new to using VBA. I have no prior experience or training with VBA. I find it very interesting but somewhat confusing at the same time. I'm hoping to get some assistance with what I am doing in VBA.

    I am using Excel 2010 and have compiled a sheet for my employees to use in the field. I have one cell F3 and that I would like to save the workbook as but also using the system date. I am using the following code, it seems to work alright but the new file is only being saved from the system date and not the text in cell F3 which would be the Client's Name. I'm not sure how to fix this. I would like to have the text in cell F3 show as the new file name first followed by the system date. I currently have this code in a module1.

    Please Login or Register  to view this content.

    Exit Sub

    End Sub

    I also have code to ensure the cell F3 along with others are made mandatory. I have this code placed into "Thisworkbook" It seems to work o.k. but wondering if I should incorporate this code into the same module as the SaveasF3() and if I should, would I have to change anything in the code. The following code is for the mandatory cell input.

    Please Login or Register  to view this content.
    Hope I haven't been too lengthy with my questions.
    Thank you in advance for any help anyone can provide.
    Plantation
    Last edited by Plantation; 03-22-2013 at 10:27 AM.

  2. #2
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Save file using cell references & mandatory cell input

    Please Login or Register  to view this content.
    should be:
    Please Login or Register  to view this content.

  3. #3
    Forum Guru HaHoBe's Avatar
    Join Date
    02-19-2005
    Location
    Hamburg, Germany
    MS-Off Ver
    work: 2016 on Win10 (notebook), private: 2019 on Win10 (desktop), 2019 on Win11 (notebook)
    Posts
    8,197

    Re: Save file using cell references & mandatory cell input

    Hi, Plantation,

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code in [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here

    Ciao,
    Holger
    Use Code-Tags for showing your code: [code] Your Code here [/code]
    Please mark your question Solved if there has been offered a solution that works fine for you

  4. #4
    Registered User
    Join Date
    02-15-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Save file using cell references & mandatory cell input

    Hello hafizimran:

    Thank you for your reply post. I changed the code as you suggested. The text that is entered into cell F3 does appear now in the new file name. Although the system date still appears before the text entered into the reference cell in the new file name. Is there a way I can alter the code and have the name entered into the reference cell appear ahead of the system date??

  5. #5
    Forum Contributor
    Join Date
    12-31-2012
    Location
    Jhang, Pakistan
    MS-Off Ver
    Excel 2010
    Posts
    250

    Re: Save file using cell references & mandatory cell input

    How innocent you are... just change the order of variables...
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    02-15-2013
    Location
    Ontario, Canada
    MS-Off Ver
    Excel 2010
    Posts
    15

    Re: Save file using cell references & mandatory cell input

    I thought of that just after I posted my question.
    Thanks again for your help.

+ 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