Results 1 to 4 of 4

Thread: [RESOLVED] Determining if macro is running

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2008
    Posts
    183

    Resolved [RESOLVED] Determining if macro is running

    Hi everyone,

    I'm still new to VB.Net and VBA so maybe you can help me out. One of the macros I wrote separates a source data workbook based on each unique value for a selected column into separate workbooks. I found the code to be faster if I called it as a macro from VB rather than preforming it in VB itself.

    The problem is that it takes a 15-20 seconds to create all the workbooks needed but there's no indication in VB that the macro is running. It goes from the
    Code:
    xlApp.Run("myMacro",arg1,...)
    straight to the next line of code. Ideally, I would like someway to create a popup that says "Now running" while the macro is being executed.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Determining if macro is running

    Welcome to the forums.

    If you used a message box, that would actually stop the execution.

    How about just turning the cursor to an hourglass then back to default after the macro is done.

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2008
    Posts
    183

    Re: Determining if macro is running

    Talk about a simple solution haha. I was confused and thought that VB continued executing while the macro was running.

    Thanks

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,335

    Re: Determining if macro is running

    Quote Originally Posted by ElPresidente408
    Talk about a simple solution haha.
    And that is so unusual for me....I have a tendency to overthink things and make them far more complicated than they need to be.

    As a newer member I ask that if you consider your question to be resolved please help us out by pulling down the Thread Tools menu and clicking the Mark Thread Resolved menu item. That will let everyone know that you have your answer.

    Thank you.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width