+ 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 2007,2010,365
    Posts
    44,091

    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 - Retired Excel/VBA Consultant

    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 2007,2010,365
    Posts
    44,091

    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)

Similar Threads

  1. Replies: 2
    Last Post: 10-08-2019, 11:30 AM
  2. Command button undo code wrote in text box
    By sterio in forum Excel General
    Replies: 5
    Last Post: 03-05-2016, 02:32 PM
  3. undo code which wrote in text box
    By sterio in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-22-2016, 05:30 AM
  4. Why is this VBA code (that I wrote) executing so slow?
    By johnw993 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-11-2015, 10:18 PM
  5. The runtime for my code I wrote takes too long, is there a way tocan you condense?
    By dnice0123 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-18-2014, 03:33 AM
  6. Replies: 10
    Last Post: 11-13-2013, 09:01 PM
  7. VBA code that I wrote seems to be looping without a Do...Loop statement. Why?
    By carpe.cervisiam in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-07-2012, 12:08 AM

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