Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assistant.NewBalloon test
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. -- jeffP |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assistant.NewBalloon test
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 Greeting, 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. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Assistant.NewBalloon test
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. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with Office Assistant VBA | Excel Discussion (Misc queries) | |||
How do you get an Assistant? | New Users to Excel | |||
newballoon function | Excel Discussion (Misc queries) | |||
Calculate mean of test scores from rows of test answers | Excel Discussion (Misc queries) | |||
Office Assistant | Excel Discussion (Misc queries) |