Student Mode Code Display

Welcome to the Fraternity!

Commenting has been enabled. You can comment on all the Code Items now.

How to Time Out Msgbox in vbScript

Add This Code to My Favourite List
Enter Email

Contributed By admin1
Date 2014-07-02 12:35:49

Const iYes= 6
Const iNo= 7
Const iYesNoDialog= 4
Const iQuestionMark = 32

Set oShell = CreateObject("Wscript.Shell")

iRet= oShell.Popup("Do you want to delete this file?",10, "Delete File", iYesNoDialog+ wshQuestionMark)

If iRet= iYes Then
    Wscript.Echo "Yes Button Clicked."
ElseIf iRet= iNo Then
    Wscript.Echo "No Button Clicked"
    Wscript.Echo "The popup timed out."
    ' Instead of above statement Do something if no input on the Pop Up
End If

Download Above Code


Updated by Yuka at 2016-02-20 14:27:38
Here is some code to get all the photos from an Outlook 2003 asdders book and dump it in a folder. Just stick it in a Macro in Outlook and run though you may get some errors if you have other types of attachments in your Contacts and may have to handle those exceptions:Sub GetPix()Dim myNamespace As Outlook.NameSpaceDim itemContact As ContactItemDim fdrContacts As MAPIFolderDim colAttachments As Outlook.ItemsDim colItems As Outlook.ItemsDim myProperty As Outlook.UserPropertyDim fname As StringSet myNamespace = Outlook.GetNamespace( MAPI )Set fdrContacts = myNamespace.GetDefaultFolder(olFolderContacts)For itemCounter = 1 To fdrContacts.Items.Count Set itemContact = fdrContacts.Items(itemCounter)Set collAttachments = itemContact.Attachments For Each atAttachment In collAttachments If atAttachment.FileName = ContactPicture.jpg Then fname = Replace(Replace(Replace(Replace(Replace((itemContact.FirstName & itemContact.LastName & - & atAttachment.FileName), : , - ), , ), / , ), ? , ), Chr(34), ) fname = Replace(Replace(Replace(Replace(Replace(Replace(fname, , ), Chr(11), ), * , ), | , ), ( , ) fname = Replace(Replace(Replace(fname, ) , ), Chr(12), ), Chr(15), ) atAttachment.SaveAsFile ( c:AA-Exporting & fname) End If NextNextEnd Sub
Updated by AndrewPap at 2018-12-01 15:19:44
<a href=><img src=""></a>

<a href=>Hello. I want to share the good news. I used to have big problems with sleep, and once a colleague at work recommended me a good tool. And know it works. I bought here.</a>
Updated by MaxPowerpeest at 2019-01-03 13:56:30
Download your missing dll from <a href=>Not Found msvcp100.dll</a> page. Fix your error now!

Add your comments...
Name : *      
Email : *      
The content of this field will be kept private and will not be shown publicly

Your Comment/Answer *

Enter the text present in this box : *