Gruppe
Dialog
Bereich
Assistent
Thema
Office-Assistenten mit vorgegebenen Texte einblenden
Problem
Auf Schaltflächendruck in einer UserForm soll der Assistent mit einem Hilfstext eingeblendet werden.
Lösung
Geben Sie den Ereigniscode in die nachfolgend genannten Module ein.
StandardModule: basMain
Sub CallForm()
frmHelp.Show
End Sub
Sub AssistentEinblenden()
Dim intSelect As Integer
Dim strUrl As String
Static blnAssi As Boolean
On Error GoTo ERRORHANDLER
blnAssi = Assistant.Visible
Assistant.Visible = True
With Assistant.NewBalloon
.Heading = "Excel-Lösungen von Hans W. Herber finden Sie ..."
.Labels(1).Text = _
"... {cf 252}{ul 1}auf dem Excel-Server{ul 0}{cf 0} ... "
.Labels(2).Text = _
"... {cf 252}{ul 1}auf der Excel-CD-ROM{ul 0}{cf 0} ..."
.Labels(3).Text = _
"... {cf 252}{ul 1}im Excel-Forum{ul 0}{cf 0} ..."
.Button = msoButtonSetCancel
.Animation = msoAnimationSearching
intSelect = .Show
End With
Select Case intSelect
Case 1: Call ExplorerOeffnen("https://www.herber.de/")
Case 2: Call ExplorerOeffnen("http://www.excel-cd.de/")
Case 3: Call ExplorerOeffnen("https://www.herber.de/forum/")
End Select
Assistant.Visible = blnAssi
Exit Sub
ERRORHANDLER:
MsgBox Chr(169) & "2001 Hans W. Herber" & vbLf & _
"hans@herber.de" & vbLf & "https://www.herber.de"
End Sub
Private Sub ExplorerOeffnen(strUrl As String)
Dim objExplorer As Object
On Error GoTo ERRORHANDLER
Set objExplorer = CreateObject("InternetExplorer.Application")
With objExplorer
.Navigate strUrl
.Visible = True
.Offline = False
End With
Exit Sub
ERRORHANDLER:
End Sub
ClassModule: frmHelp
Private Sub cmdCancel_Click()
Unload Me
End Sub
Private Sub cmdHelp_Click()
Call AssistentEinblenden
End Sub