+ Reply to Thread
Results 1 to 5 of 5

Amend macro to prompt for file name/path of source data

  1. #1
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Leicester
    MS-Off Ver
    Excel 2010
    Posts
    119

    Amend macro to prompt for file name/path of source data

    Hi,

    I have recorded the below Macro (basically splits out a long text string into something readable, with headers etc)

    What I would like is to be able to amend this, so that instead of copying and pasting the data from the source file into an excel template, I can just open the .xlt and be prompted for the file name/file path of the file with the data in and it be automatically formatted as below.

    Also, it would be good if once formatted, it was saved as .xls in the same location as the source file.

    Not sure if this is possible, probably is, but beyond my level of knowledge.

    There a quite a few of these macros, so is reasonably time consuming copying and pasting all the relevant data.




    Please Login or Register  to view this content.

  2. #2
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,162

    Re: Amend macro to prompt for file name/path of source data

    It will be good if you attach a sample of the template and the raw data.
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Leicester
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Amend macro to prompt for file name/path of source data

    Example of source data attached.

    The template is just an .xlt with the above macro in it.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,162

    Re: Amend macro to prompt for file name/path of source data

    What is the exact formatting that is required?

  5. #5
    Forum Contributor
    Join Date
    06-17-2010
    Location
    Leicester
    MS-Off Ver
    Excel 2010
    Posts
    119

    Re: Amend macro to prompt for file name/path of source data

    How do you mean formatting?

    It is already formatted, I need help with what I have specified:

    1. Being prompted when you open the .xlt to select the file you want to import and apply the above formatting to.

    2. Once macro has finished to auto save the .xls to the same location as the source file.

+ 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