+ Reply to Thread
Results 1 to 4 of 4

Create a Txt File, Rename and Save It

  1. #1
    Registered User
    Join Date
    07-22-2010
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    71

    Create a Txt File, Rename and Save It

    Hi There,

    I need your help.

    I would like to create a macro, such that at a click of a button would accomplish the following:

    1. Create a new txt file where the number "123456" is provide by a text box on a user form followed by a "1" on the next line.

    eg. of what is in [test.txt]

    123456
    1

    2. Rename the file to "123456.ccm" and save the ouput to file to C:\Temp

    Your help and support with this is grealy appreciated.

    A Huge thanks in advance.
    Last edited by jason_kelly; 11-24-2010 at 04:46 PM.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create a Txt File, Rename and Save It

    Like so:

    Please Login or Register  to view this content.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Create a Txt File, Rename and Save It

    Does that work for you?

  4. #4
    Registered User
    Join Date
    07-22-2010
    Location
    Ontario
    MS-Off Ver
    Excel 2003
    Posts
    71

    [SOLVED] Re: Create a Txt File, Rename and Save It

    It works great!

    Thanks so much.

    Jay

+ 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