[Webinar] Streamline your web hosting managementRegister Today

x
?
Solved

Display Form running AVI File while executing macro on spreadsheet

Posted on 2005-05-04
7
Medium Priority
?
253 Views
Last Modified: 2013-12-25
I have written a macro that performs some actions on an Excel spreadsheet. It takes about a minute to completely execute. I want to display a form with an animation control that runs a working AVI file while Excel continues to run the macro. I have placed the "DoEvents" in the Inialize event and tried it in the activate event of the form. I have also tried to place it in the macro in the line above the line I call the form show, but when I run the macro the form displays and the AVI is running but the next line of code in the macro does not execute until you close the form. Can anybody tell me if this is possible and what I can do to make this happen. Thanks!!
0
Comment
Question by:gar7
  • 3
  • 2
  • 2
7 Comments
 
LVL 29

Expert Comment

by:leonstryker
ID: 13930630
You may likely will need to run it as a separate EXE and call it with a Shell function.  VB does not really support multithreading very well.

Leon
0
 

Author Comment

by:gar7
ID: 13930893
How do I run a form as a separate EXE and call it with a shell function?
0
 
LVL 8

Accepted Solution

by:
tonsofpcs earned 750 total points
ID: 13931359
Shell("pathandfilename.exe",windowmode)
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
LVL 29

Expert Comment

by:leonstryker
ID: 13935483
Thanks tonsofpcs.

gar7,

The form will need to be created in VB and you will likely need to include something in your code to allow you to terminate the exe then your VBA code stops running.

The other thing you may want to try is create a Splash screen in Excel.  Here is a link which explains how to do it:

http://www.j-walk.com/ss/excel/tips/tip39.htm 

Leon
0
 

Author Comment

by:gar7
ID: 13935504
How do I stop the EXE when I am ready... through the code in my macro?
0
 
LVL 8

Expert Comment

by:tonsofpcs
ID: 13951878
You could use DDE, or you could use APIs to press a button that is hidden in the running application.
0
 

Author Comment

by:gar7
ID: 13958775
Thanks for help!!
0

Featured Post

Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

607 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question