VBA- Application.Wait?

Does PowerPoint not have "Application.Wait" like Excel? Is there
another way to pause code for a few seconds in PPT 2003/2007 while a
small bat file runs?

-Mel
0
Mel
3/10/2010 7:29:14 AM
powerpoint 2011 articles. 0 followers. Follow

2 Replies
17369 Views

Similar Articles

[PageSpeed] 41

On 3/10/10 2:29 AM, Mel wrote:
> Does PowerPoint not have "Application.Wait" like Excel? Is there
> another way to pause code for a few seconds in PPT 2003/2007 while a
> small bat file runs?
>
> -Mel

 From Example 8.4 on my Web site (http://www.PowerfulPowerPoint.com/):

Sub Wait()
     waitTime = 5
     Start = Timer
     While Timer < Start + waitTime
         DoEvents
     Wend
End Sub

This will wait for 5 seconds.

--David

-- 
David M. Marcovitz
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
Microsoft PowerPoint MVP
Associate Professor, Loyola University Maryland
5
David
3/10/2010 3:45:32 PM
In article <312255c7-711b-46a2-977e-
ed55b9e151f5@g7g2000yqe.googlegroups.com>, Mel wrote:
> Does PowerPoint not have "Application.Wait" like Excel? Is there
> another way to pause code for a few seconds in PPT 2003/2007 while a
> small bat file runs?

Put your macro to Sleep
http://www.pptfaq.com/FAQ00466.htm

There are more sophisticated ways of doing it, like launching the bat 
file and monitoring its window, not proceeding until it closes.  But if 
you know that your bat file will complete in a short time and don't 
mind waiting a few milliseconds extra here and there ... Sleep's the 
simplest, most reliable way to get the job done.

==============================
PPT Frequently Asked Questions
http://www.pptfaq.com/

PPTools add-ins for PowerPoint
http://www.pptools.com/


0
Steve
3/10/2010 4:11:31 PM
Reply:

Similar Artilces:

How do I print from a dialog application
I've searched the archives of this group but haven't found much info on this. My situation is that I have a dialog application from which I need to print some graphical data. I've done printing in doc/view applications before, but I'm not sure where to start in a dialog application. I was hoping that there would be something like a CPrintView class in MFC, but there isn't. So, I need to understand what I have to do to set up a view that I can draw into for printing, and to have that data actually sent to the printer. Any help greatly appreciated. Mike Hi, http://ww...

unable to run office applications
i have been successfully running a macbook with OS X v 10.4 and ms office 2004 since november 2006. recently, have been unable to run any of my office applications. i can see the icons but when i click on them, nothing happens...i've tried to open word, excel, powerpoint, entourage and it is consistent across the board. any advice would be greatly appreciated. In article <1187041732.694332.277290@l70g2000hse.googlegroups.com>, kamsumner@mac.com wrote: > i have been successfully running a macbook with OS X v 10.4 and ms > office 2004 since november 2006. recently, have b...

inter application messages
Is there a way to post a message from one application to another? ----------------- www.Newsgroup-Binaries.com - *Completion*Retention*Speed* Access your favorite newsgroups from home or on the road ----------------- Yes you can. You have to find the hwnd of the target application's window and post to that, or broadcast a registered windows message. For passing data between two processes you want to use WM_COPYDATA. AliR. "Ron H" <rnharsh@nospam.net> wrote in message news:493e9063$0$12982$8d2e0cab@news.newsgroup-binaries.com... > Is there a way to post a mess...

Access 2003, sharing application over a Novell Network
I recently built a simple 12,000 record database (a little over 7 MB) for my assoicates all over the country via our VPN . It was created in Access 2003, converted to Access 2000, and runs off a shared drive on a Novell server in Washintgton DC. The response times have been incredibly slow, upwards of a minute to query an initial record tied to the primary key. (although it responds instantly when running off a single stand alone PC) Does anyone have any tips about how I can make it run quicker or respond faster over a Novell network via VPN? It's pretty much dead in the water no...

Open textfile delimited with VBA
I want to use (something like) below VBA code to open an=20 unspecified file with specified delimited characters. I.e.=20 how to make the file path "C:\PLC511A3_DB105.prn" dynamic?=20 Is there a command that only returns the file path? Regards, Henrik Sub Macro1() ' ' Macro1 Macro ' Macro recorded 2003-07-31 by Henrik Wikstr=F6m ' ' Workbooks.OpenText Filename:=3D _ "C:\PLC511A3_DB105.prn", Origin:=3D _ xlWindows, StartRow:=3D1, DataType:=3DxlFixedWidth,=20 FieldInfo:=3DArray(Array(0, _ 1), Array(6, 1), Array(13, 1), Array(4...

VBA For View Options on Employee Lookup
Our users would like me to customize their employee lookup to only have "active employees" (exclude inactive). There is an existing favorite smartlist object called "active employees only", so they can manually choose that favorite on the employee lookup window via the "View.." button. My question is how can I use VBA to have this happen. I have tried adding the "ViewAllEmployeesbyEmployeeID" (field) and set the value property, so that I can default to "Favorites", but I am not sure how to set the favorites to the "Active emplo...

VBA Footer
I have created a module which automatically puts the file path and current date in the footer of any file I create. What I would like to do it to also put in the author (creator-not who modified it or who is viewing it) of the spreadsheet and the create date. Anyone have script already written for this? If you mean the author as it appears in the workbook properties in the File menu use: ActiveWorkbook.BuiltinDocumentProperties(3) -- Jim <kerbe@pactiv.com> wrote in message news:da1d7fa5-6982-40eb-9cc6-a104eade92a6@x35g2000hsb.googlegroups.com... |I have created a module which aut...

Server Error in '/' Application.
Dear All , The resource cannot be found. Description: HTTP 404. The resource you are looking for (or one of its dependencies) could have been removed, had its name changed, or is temporarily unavailable. Please review the following URL and make sure that it is spelled correctly. Requested URL: /monitoring/usage.aspx -------------------------------------------------------------------------------- Version Information: Microsoft .NET Framework Version:2.0.50727.42; ASP.NET Version:2.0.50727.210 how to solve this issue . =?Utf-8?B?eXM=?= <ys@discussions.microsoft.com...

Make code Intersect applicable for all rows.
I have undermentioned code in the Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Me.Range("C07")) Is Nothing Then If Target.Count > 1 Then Exit Sub Application.EnableEvents = False Set rng = ActiveWorkbook.Names(Target.Value).RefersToRange Me.Range("D07").Value = rng.Offset(0, 0).Value End If I do have the first two columns with combo's. The code is repreated 50 times, as I have 50 rows. How to make it applicable for all rows, so I mentioned the code only one time? Bart Ex 2003 Untested... Private Sub Worksheet_Change(By...

Can any application read data from CRM database?
Hi, I would like to check if any application for example a RightFax Server reads data like fax and contact name from MS CRM database? There's no need for copying of data from MS CRM database but just for reading records purpose only? The application does not have a database. All it does is to retrieve the data (contact name and fax number) from MS CRM database and use the retrieved data to send a fax to the respective retrieved contact name and fax number. Because currently the RightFax Server connects to an Access database using ODBC. Can I reuse this ODBC to point to MS CRM dat...

Excel 2002, VBA, macros and Windows 7
I purchased a new computer several days ago. It uses Windows 7. My old computer ran Windows XP and Office 2002. I transferred all my data files from the old computer to the new one. When I opened an excel workbook which contains a macro with some VBA coding, a message was displayed that the workbook had lost its VBA Project and other programmability controls. I also have other workbooks which use macros. Can someone please advise me what I have to do to access the macro under Windows 7. It depends. The answer might be that you don't have to do anything or you need to d...

Converting Console Application to win32 application
I have created an MFC console application. When I run it from Windows Explorer it opens a dos box and closes the box when it terminates it logic. Is it possible to convert it so it won't open the dos box - just run without any display? If positive, please help me regarding the steps. Thanks Kalish I am not sure if you can compile MFC with a standard win32 application, but if you can, then you can simply change your main to a WinMain, and you will have the result you want. Create a Win32 Project using the Wizard, and selection Windows Application, to see an example. Remove everthing ...

Application REPAINT Issue
Hello, i've designed a skinned SDI application it, it has multiple splitters and each splitter has a background of image. my application runs ok under 2000 pro & server. but under windows XP when i lock my windows XP and when i log on back then my application is not repainted. its strange cause when i minimize my aplication and restore it , it repaints it but why not when some screen saver is displayed or something i log back on.? any possible solutions. ? Thanks Danish >i've designed a skinned SDI application it, it has multiple splitters and >each splitter has a backgro...

VBA code go to specific location in embedded document
From Excel I'm opening an embedded OLE object (Word document). Once the document is open, I need to be able to go to a location in the document (preferably by keyword search). Is this possible? Private Sub Worksheet_FollowHyperlink(ByVal Target As Hyperlink) If Target.Range.Address = "$A$4" Then Set Obj = Sheets("report").OLEObjects("Object 1") Obj.Activate End If End Sub ...

VBA and layout
How do I programmatically change the defaults for the layout properties using Visio 5.0? I am trying to change the style to "Top to Bottom", depth to "Deep" and routing to "Flowchart" for the current page. Thanks If memory serves, Visio 5.0 stored those settings as User-Defined cells on each page. You can use Visio's API to access and modify any Shapesheet cell. -- Mark Nelson Microsoft Corporation This posting is provided "AS IS" with no warranties, and confers no rights. "L. Minisci" <miniscil@iwon.com> wrote in message n...

Naming in Sheet how using by VBA?
A sheets cell have a named. Exaplme: Sheet1!Records=[Sheet1!B1] I don't want use Sheet1.Range("B1") in VBA, because the cell can moving sometime. so I set the cell a name. but I don't know how use the name of sheets in VBA. Thank. try this in any worksheet in the workbook to put the value of myrange in cell c6 Sub namedrng() Range("c6") = Range("myrange") End Sub -- Don Guillett SalesAid Software donaldb@281.com "Cactus [������]" <a@b.com> wrote in message news:uAhHF4YJFHA.3832@TK2MSFTNGP12.phx.gbl... > A sheets cell have a named....

select a range by cell names; vba
I'm trying to select X rows for a sort. The first and last rows have a defined name, RSTART and RLAST. They look like this in the Define Name dialog: ='MySheet'!$15:$15 .... How do you select the rows using these names. Here's the macro output of my best shot. I can't figure out how to incorporate the second name. Thank you. Sub trythis() Application.Goto Reference:="RSTART" Rows("15:59").Select '<---- Held down shift key and selected RLAST in cell address combo Range("I15").Activate ' what is ...

VBA Format Conditions
Can anybody tell me why I get the error message 'Expected: =' at the .Add line? Thanks! h is a defined range of cells. I'm trying to conditionally format several cells so that if they are greater than the cell two columns to the left of them, the font will be green. With h.FormatConditions .Delete .Add(xlCellValue, xlGreater, ActiveCell.Offset(0, -2)) End With Mark, You don't use the parens with the .Add unless you want to set a variable equal to the returned value. Also, you need to pass a valid cell address to the .Add, not the cell itself...

help on vba macro to put multiple charts on multiple worksheets based on table in each worksheet
I have a 26 workbooks with about 100 worksheets for tracking stocks. It is in the form of a table. It has date, open, low, high, close volume, and adjusted close for the headers. Each worksheet is named after the stock ticker name such as ATT. I am trying to create a macro which will go through each sheet from a list in column C of a sheet called Insurt and create 3 charts on each sheet. One with the prices and dates excluding the volume for the entire table, approximately 1500 rows. The second chart is for 250 rows, approximately 1 year, and the third chart is for 50 rows, approximately 3 mon...

Status Bar in Dialog Application
Why does CStatusBarCtrl work well with Dialog based applications while CStatusBar does not? Can easily instantiate visible status bar and resize with all code shown in MSDN. Is there any way to create indicators (NUM, CAPS, SCRL) in CStatusBarCtrl panes along with associated ON_UPDATE_COMMAND_UI()? Tried article 148533 - no luck. Found 141751 and example works. I want to create dialog based application with stretchy first pane, NUM, CAPS and SCRL. Also, how does one change the number of panes, eg. from 3 to 2 and back from 2 to 3 easily? I am trying to duplicate many of the capabilities of VB...

VBA "Rnd" Function: Truly Random?
Hi, I am having some doubts over the VBA "Rnd" function about if it really generates a random number (between 0 and 1). In the Help file, it states that: > Returns a Single containing a random number. > > Syntax > > Rnd[(number)] > > The optional number argument is a Single or any valid numeric > expression. > > Return Values > > If number is Rnd generates > Less than zero The same number every time, using number as the seed. > Greater than zero The next random number in the sequence. > Equal to zero The most recently generated ...

Condense VBA Code
I have the following code replicated 20 times and works just fine, however whenever the POWERS TO BE decide to change the names (TTW) I have to change all references to those names. There are 5 in every module. A total of 100 manual changes in this module along. Anyway to condense this VBA module??? Thanks Frank Windows("TTW Cap Model.xls").Activate Application.DisplayAlerts = False ActiveSheet.Unprotect ("TTW") ActiveSheet.Shapes("Button 1").Select Selection.OnAction = "Switchboard.xls!QUICKBASETTW" Range("A1")....

compact/repair/backup with VBA
I want to compact/repair/backup the backend database from the frontend database using VBA code. I'm using Access 2003 and the application will be used with the runtime. I see several options for RunCommand, but they aren't explained. Can anyone give me some sample code? Should the compact/repair/backup be done in a certain order? Jennifer Hi You could do this from an OnClick - something like strDBtoBackUp = "Path to DB" DBEngine.CompactDatabase strDBtoBackUp eg (air code - not checked - no time at the moment but this is about right ??) Private Sub ButtonName_Click(...

Excel VBA PageSetup Questions
Hi, I want to specify that my xlSheet objects page setup so that fit page is enabled and put Page X of Y in the footer. I have so far: With xlSheetNew.PageSetup .Orientation = xlLandscape .FitToPagesWide = 1 .FitToPagesTall = 1000 .LeftFooter = "Engman-Taylor Co." .CenterFooter = "Page " End With My two problems are fittopage is not activated and I don't know how to reference page and pages in the footer. Can anyone help me? TIA, Dan Dan Simply setting the properties enables f...

VBA Script Question
Hi All, Below I pasted part of some script. On the last line of the script I have "WEDNESDAY PICK-PUT-VAS.xls'!Sheet4.hide_unhide_rows". The script only works if the file name of the worksheet is the same as it is written in the script. I would like it to work no matter what the file name is changed to. Any help is appreciated. Sheets("SUMMARY").Select Application.Run "'WEDNESDAY PICK-PUT-VAS.xls'! Sheet4.hide_unhide_rows" James Change Sheets("SUMMARY") to Activesheet I would also move the Sub hide_unhide_rows out of sheet4 and...