+ Reply to Thread
Results 1 to 7 of 7

How to make a recorded macro apply to various workbooks

  1. #1
    Registered User
    Join Date
    03-03-2017
    Location
    Athens
    MS-Off Ver
    2016
    Posts
    15

    How to make a recorded macro apply to various workbooks

    Hello,

    Every month I pull a lot of financial documents off of our accounting program and then proceed to format them all in the same manner. I was trying to speed this process up by running a recorded macro. However, the issue is when I do this it becomes sheet specific. Any way of fixing this? Thanks, I am very new to macros and VBA.

    This is the recorded macro below.



    Please Login or Register  to view this content.
    Last edited by NeedhelpwithExcel2; 08-29-2017 at 03:45 PM. Reason: Added missing CODE /CODE tags, please read and follow the Forum Rules, a link to them in blue menu bar above. Thanks!

  2. #2
    Registered User
    Join Date
    08-21-2012
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    22

    Re: How to make a recorded macro apply to various workbooks

    Check out this link:
    https://support.office.com/en-us/art...1-ae005a9bc790

  3. #3
    Registered User
    Join Date
    03-03-2017
    Location
    Athens
    MS-Off Ver
    2016
    Posts
    15

    Re: How to make a recorded macro apply to various workbooks

    My issue I think lies in the Windows("store-is-pqy-16.csv").Activate line. Whenever I receive the next file that I have to format it would come in as store-is-pqy-17.csv therefore the macro would not pick up the new file. I can go in and manually change this everytime, but by the time I do that I could have just manually formatted it. Is there a way that that line of VBA can update everytime so that it will recognize the new workbook?

  4. #4
    Registered User
    Join Date
    08-21-2012
    Location
    California
    MS-Off Ver
    Excel 2016
    Posts
    22

    Re: How to make a recorded macro apply to various workbooks

    I'm not sure I quite understand. I know that csv = comma separated values file. So you are having to open a *.csv file and split into cells by the comma delimiter? Are you opening the *.csv in excel by right clicking in windows and then choosing open with ---> excel or are you copying from a text file and pasting into excel?

  5. #5
    Registered User
    Join Date
    03-03-2017
    Location
    Athens
    MS-Off Ver
    2016
    Posts
    15

    Re: How to make a recorded macro apply to various workbooks

    Opening from windows

  6. #6
    Registered User
    Join Date
    03-03-2017
    Location
    Athens
    MS-Off Ver
    2016
    Posts
    15

    Re: How to make a recorded macro apply to various workbooks

    Opening from windows

  7. #7
    Registered User
    Join Date
    03-03-2017
    Location
    Athens
    MS-Off Ver
    2016
    Posts
    15

    Re: How to make a recorded macro apply to various workbooks

    https://stackoverflow.com/questions/...ame-is-changed


    This is my exact problem but not sure how to implement this into my Macro. Any help would be much appreciated.

+ 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. [SOLVED] Run Personal Recorded Macro on other workbooks and sheets.
    By LeoThe Lion in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 11-10-2016, 06:27 AM
  2. Make a recorded macro generic
    By magnuskaeldso in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-17-2015, 03:22 AM
  3. Recorded macro is not usable by multiple workbooks
    By jlach in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2013, 04:17 PM
  4. Make recorded macro loop
    By cowannbell in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 01-11-2013, 09:53 AM
  5. [SOLVED] Trying to make a recorded macro work properly
    By Nick12 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-05-2012, 11:56 AM
  6. How do I change a recorded macro to make it general?
    By excelVBAn00b in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-16-2012, 03:38 PM
  7. Apply Macro to multiple Workbooks at Once
    By Prevostb in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 04-11-2012, 05:25 PM

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