Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 17
Default 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.

  #4   Report Post  
Posted to microsoft.public.excel.programming
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.



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with Office Assistant VBA Mojo Excel Discussion (Misc queries) 1 July 20th 09 09:53 PM
How do you get an Assistant? Frogger New Users to Excel 2 September 8th 07 12:05 PM
newballoon function jfarrug Excel Discussion (Misc queries) 0 December 20th 06 10:12 PM
Calculate mean of test scores from rows of test answers RiotLoadTime Excel Discussion (Misc queries) 1 July 26th 06 05:14 PM
Office Assistant Sunflower Excel Discussion (Misc queries) 0 March 30th 05 06:51 AM


All times are GMT +1. The time now is 04:10 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"