+ Reply to Thread
Results 1 to 5 of 5

Excel Macro to run on a specific title of a workbook

  1. #1
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    26

    Excel Macro to run on a specific title of a workbook

    I have a macro that adds formulas and formatting. i need it to

    1. run on a specific already opened workbook and worksheet with a specific name. the work book and worksheet both start with "XYZ%". the format of the file is CSV.
    2. After the macro runs save it in text format in the same location.

    thanks heaps.
    Last edited by spr2017; 06-18-2018 at 02:36 AM.

  2. #2
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    39,342

    Re: VBA Macro

    Please take a few minutes to reread the forum rules about thread titles, and then amend yours accordingly.

    Thanks.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    39,342

    Re: Excel Macro to run on a specific title of a workbook

    Thank you.

    Please Login or Register  to view this content.
    Last edited by shg; 06-19-2018 at 12:30 PM.

  4. #4
    Registered User
    Join Date
    11-21-2017
    Location
    SYDNEY
    MS-Off Ver
    2016
    Posts
    26

    Re: Excel Macro to run on a specific title of a workbook

    Hello,

    thanks but looks like the macro doesn't check other open workbooks with the same name. it does the first one and then closes it but doesn't go to the next one? also, if it can't find the workbook i can just put else exit sub?
    Last edited by spr2017; 06-17-2018 at 08:00 PM.

  5. #5
    Forum Guru shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    39,342

    Re: Excel Macro to run on a specific title of a workbook

    ... looks like the macro doesn't check other open workbooks with the same name. it does the first one and then closes it but doesn't go to the next one?
    The code checks all open workbooks until it finds a workbook named like xyz%* that has a worksheet named like xyz*%.

    also, if it can't find the workbook i can just put else exit sub?
    You can, but that's what the code already does.

+ 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