VB and VBA Users Source Code: Displaying a custom Office Assistant
[
Home
|
Contents
|
Search
|
Reply
| Previous | Next ]
VB/VBA Source Code
Displaying a custom Office Assistant
By:
Andrew Baker
Email (spam proof):
Email the originator of this post
Date:
Thursday, February 15, 2001
Hits:
575
Category:
Unspecified
Article:
The following demonstration routine can be used to display the office assistant/wizard with a specified caption/heading: 'Purpose : Shows the office assistant with a specified message 'Inputs : sCaption The text displayed by the assistant ' sHeading The title of the caption box ' [bModal] If True the assistant will appear as a modal dialog ' [lTop] If specified, the top position of the assistant ' [lLeft] If specified, the left position of the assistant 'Outputs : If Error occurs returns the error number, else returns 0 'Author : Andrew Baker 'Date : 28/12/2000 12:37 'Notes : 'Revisions : Function OfficeAssistantShow(sCaption As String, sHeading As String, Optional bModal As Boolean = True, Optional lTop As Long = -1, Optional lLeft As Long = -1) As Long On Error GoTo ErrFailed With Assistant .On = True .Visible = True If lTop <> -1 Then .Top = lTop End If If lLeft <> -1 Then .Left = lLeft End If With .NewBalloon .BalloonType = msoBalloonTypeButtons .Icon = msoIconTip .Heading = sHeading .Text = sCaption If bModal Then .Mode = msoModeModal Else .Mode = msoModeModeless End If Assistant.Animation = msoAnimationBeginSpeaking .Show End With End With Exit Function ErrFailed: OfficeAssistantShow = Err.Number On Error GoTo 0 End Function
Terms and Conditions
Support this site
Download a trial version of the Excel Workbook Rebuilder