View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
jeffP jeffP is offline
external usenet poster
 
Posts: 38
Default Assistant.NewBalloon test

Wouter,
This worked terrifically . Thanks.
I have developed a problem though. I was fooling ' .Mode =
msoModeAutoDownand '.Mode = msoModeModeless
'.Callback = "macro1"
NOW I'm stuck w/ this balloon. Each time I open the assistant, whether my
NewBalloon or F1 first I get the newballoon and then the oldballoon.
I deleted the sub, closed the workbook, still......
Any help would be appreciated.

--
jeffP


"Wouter" wrote in message
om...
Hi Jeff,

I worked out this:

Sub MyBalloon()
Dim blnMy As Balloon
Dim lngChoosen As Long

Set blnMy = Assistant.NewBalloon
With blnMy
.BalloonType = msoBalloonTypeBullets
.Icon = msoIconTip
.Button = msoButtonSetOkCancel
.Heading = "Tips voor het opslaan van gegevens."
.Labels(1).Text = "Your first line of text"
.Labels(2).Text = "Your second line of text"
lngChoosen = .Show
End With
MsgBox "OK:" & vbTab & (lngChoosen = msoBalloonButtonOK) & vbNewLine &

_
"Cancel:" & vbTab & (lngChoosen = msoBalloonButtonCancel)
End Sub

Good Luck

Wouter.

"jeffP" wrote in message

...
Hi all,
I made a new balloon and I want to test the answer of the
msobuttonsetYesNoCancel
As you may know no matter what button is selected it returns 5. Or if
using
msobuttonsetYesNo then the return is 4. Or AbortRetryIgnore is a

constant
10.
The object browser tells me they are assigned these constant values but

I
don't get it. I'm sure the buttons can be tested,because otherwise there
would be no need for more than one button.
I want to test the buttons just like vbyes from a msgbox but obviously

I'm
lost.

Any help and explanations are always appreciated.