+ Reply to Thread
Results 1 to 4 of 4

Active Workbooks Displayed before Running Macro Code?

  1. #1
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Active Workbooks Displayed before Running Macro Code?

    Hi,


    I was hoping someone could help out with a snippet of code that I could display the active workbook name and give me the option to cancel or Run the REST OF THE code depending on the activew workbook that's active.


    many times I run macros with various workbooks open and it always can slow down the process if the wrkbk I need to be active is not...

    Thanks for anyfeedback and I doubt excel can let you see all the active workbooks and then select which one to run the rest of your macro on right?

  2. #2
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Active Workbooks Displayed before Running Macro Code?

    To just display the name of the active workbook and decide whether to continue or not:

    Please Login or Register  to view this content.
    For a list of workbooks, you'd need a userform really.
    Remember what the dormouse said
    Feed your head

  3. #3
    Forum Contributor
    Join Date
    03-14-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    491

    Re: Active Workbooks Displayed before Running Macro Code?

    Quote Originally Posted by romperstomper View Post
    To just display the name of the active workbook and decide whether to continue or not:

    Please Login or Register  to view this content.
    For a list of workbooks, you'd need a userform really.
    Thanks for the code, Can't you list all active workbooks and the turn those into variables or something?

  4. #4
    Forum Guru romperstomper's Avatar
    Join Date
    11-04-2008
    Location
    A1
    MS-Off Ver
    Most
    Posts
    12,302

    Re: Active Workbooks Displayed before Running Macro Code?

    Yes but you need some user-friendly means of deciding which one should be active - that's what I'd use a userform for.

+ 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. Code for makro running automatic every .... minutes (if active)
    By kanopat in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-06-2014, 10:57 AM
  2. [SOLVED] Stop code running through Sub when MsgBox is displayed
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-20-2013, 07:43 AM
  3. Macro to autoclose hidden workbooks is closing all active workbooks
    By tlchavez in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-23-2013, 06:38 PM
  4. Enter key moves active cell unexpectedly after running code
    By GCW esq in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-26-2011, 04:43 AM
  5. Running code in one open workbook another active
    By shumba in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-14-2010, 04:20 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