![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#5
|
|||
|
|||
![]()
Because I stupidly forgot the text for the MsgBox function's return value:
strMsg = "Do you want to run the macro to expand all the folders... ?" If MsgBox(strMsg, vbYesNo + vbQuestion, "Expand all?") = vbYes Then ExpandAllFolders End If -- Sue Mosher, Outlook MVP Author of Microsoft Outlook 2007 Programming: Jumpstart for Power Users and Administrators http://www.outlookcode.com/article.aspx?id=54 "StargateFan" wrote in message ... On Sun, 16 Dec 2007 15:44:49 -0500, StargateFan wrote: On Sun, 16 Dec 2007 14:29:33 -0500, "Sue Mosher [MVP-Outlook]" wrote: Use a MsgBox statement: Private Sub Application_Startup() If MsgBox("Do you want to expand?", vbYesNo + vbQuestion, "Expand all?") Then ExpandAllFolders End If End Sub WOW!! That is so kewl!! I just changed the text a bit to this: "Private Sub Application_Startup() If MsgBox("Do you want to run the macro to expand all the folders... ?", vbYesNo + vbQuestion, "Expand all?") Then ExpandAllFolders End If End Sub" and then it ran the macro at triple speed! Pretty kewl. Is there a "sleep" function in vb? I'd like to add a second or 2 or sleep before the message box comes up. This box pops up a bit too quickly after one presses okay to enable macros. Thanks for this! ![]() [snip] Oops, didn't check it out thoroughly. The macro still runs even when we press NO! ![]() How come? g Thanks. ![]() |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Outlook macro abends but Word macro runs successfully | Jreue | Outlook and VBA | 0 | December 14th 06 12:55 AM |
Address prompt | Lawrence J.Ryz | Outlook - Using Contacts | 1 | October 24th 06 01:09 PM |
Call macro stored in Excel workbook from Outlook's macro | Gvaram | Outlook and VBA | 5 | October 4th 06 07:26 AM |
security prompt | Rog | Add-ins for Outlook | 1 | July 13th 06 06:46 AM |
Macro to prompt for metadata and them place in the subject line | Ben Bazian | Outlook and VBA | 1 | April 12th 06 07:19 AM |