+ Reply to Thread
Results 1 to 8 of 8

userform to gather input file and output folder, process reports and save

  1. #1
    Registered User
    Join Date
    08-06-2012
    Location
    stinkyfeet
    MS-Off Ver
    Excel 2007
    Posts
    10

    userform to gather input file and output folder, process reports and save

    Hi All,
    I am trying to develop a userform that will ask the user to browse and select an excel file where raw data is kept (input file, attached) on Sheet1 and copy the contents of that sheet into one in the macro workbook (report maker, attached; where the userform lives) to create the reports. The userform will also ask where the reports to be generated will be saved...there is a macro that is working* which populates the reports selected and saves them appropriately. I have included notes in the code of the macro to help make clear my thoughts on how the macro should function.

    Thanks for your help and suggestions,
    rufus


    *be sure to have the folder referenced in myPath created on your computer before running the macro

    a previous thread has the construction of the working macro, here: http://www.excelforum.com/excel-prog...64#post2885964
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: userform to gather input file and output folder, process reports and save

    hi rufuswilson, please check attachment, run code "UFshow"
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    08-06-2012
    Location
    stinkyfeet
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: userform to gather input file and output folder, process reports and save

    thank you, waterserv, for your rapid response.
    your code is helpful. however, I am running into an issue with the output.... the data from sheet1 of the input file is not being copied onto the "raw copy" sheet in the report maker book. also, I am confused by what you are referencing by using application.username ... I would have thought the ctrl.caption would be a string that would check cell A1 in the input file to make sure it matched the username....

  4. #4
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: userform to gather input file and output folder, process reports and save

    Quote Originally Posted by rufuswilson View Post
    The userform will also ask where the reports to be generated will be saved...there is a macro that is working* which populates the reports selected and saves them appropriately
    The code behind the userform has nothing to do with coping. That was your part that you said is working. I did not check that.

    I have not noticed anywhere in the comments that username is checked with "A1" value. Change that to your requirement. Application.Username gives username of Excel user.

  5. #5
    Registered User
    Join Date
    08-06-2012
    Location
    stinkyfeet
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: userform to gather input file and output folder, process reports and save

    yes, I'm sorry. I had further notes in the report maker code that requested the input file be the one that is copied into the report maker--this was done manually before and did work. I am unsure of how to make the input file and specifically Sheet1 become the location from which to copy data into "Raw Copy" during the sub create_copy

    I now understand from where your reference to username came. I am sorry I did not explicitly say it was to check against A1 of the input file before doing create_report... I guess the check can occur during the sub create_copy.

    if you can assist with showing me the code to get the input file copied, I think I can manage the remaining steps.... Thank you again.

    rufus

  6. #6
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: userform to gather input file and output folder, process reports and save

    if you do not mind I would look at it tomorrow ...

  7. #7
    Forum Expert
    Join Date
    11-29-2010
    Location
    Ukraine
    MS-Off Ver
    Excel 2019
    Posts
    4,168

    Re: userform to gather input file and output folder, process reports and save

    please check attachment, press "Create reports" on Report sheet
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    08-06-2012
    Location
    stinkyfeet
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: userform to gather input file and output folder, process reports and save

    thank you!! very helpful.

+ Reply to Thread

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