+ Reply to Thread
Results 1 to 4 of 4

My Sub code runs it goes through all the vba functions that i wrote

  1. #1
    Registered User
    Join Date
    02-14-2020
    Location
    Portland, Oregon
    MS-Off Ver
    Office 365
    Posts
    2

    My Sub code runs it goes through all the vba functions that i wrote

    I have created a sub procedure in a workbook to open and split apart a master merit planning workbook into separate planning mgr workbooks, however, it is running through all of the vba functions in the merit planning workbook while going through the sub procedure. How do i make it so it doesn't run through the vba function code in the merit planning workbook?

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    29,916

    Re: My Sub code runs it goes through all the vba functions that i wrote

    Compare the workbook name (being processed) to the merit planning workbook name. If they are equal, exit the subroutine(s).
    Trevor Shuttleworth - Excel Aid

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    02-14-2020
    Location
    Portland, Oregon
    MS-Off Ver
    Office 365
    Posts
    2

    Re: My Sub code runs it goes through all the vba functions that i wrote

    Thank you TMS. I am new to this so I am not sure what you are trying to tell me. Can you please give additional comments? Thank you

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2003,2007,2010
    Posts
    29,916

    Re: My Sub code runs it goes through all the vba functions that i wrote

    Can you please give additional comments?
    Based on what you've told us so far, no, not really. It would depend on what your code looks like. Presumably, you are looping through the workbooks doing something (or some things) with each one. You know what that loop looks like and what you are doing.

    Please note the yellow banner at the top of the page and post a sample workbook. Ideally, for those looking at the forum on a tablet, post the code in the thread.

+ 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