Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Balloon button

good morning everybody,

i would like to use message balloons (like the help menu) in macro to write
various messages/yes or no functions, etc. instead of messageboxes.
thanks in advance!
--
sisco98
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Balloon button


Good morning Sisco98

You can utilise the office assistant if you so wish. The code below
will give you an idea on how to start using it, so copy it inot a
module and have a tinker with it.

Sub Test()
With Assistant.NewBalloon
..Heading = "Look at me"
..Text = "Here's how I destroy rubbish. Do you like it?"
..Button = msoButtonSetYesNo
..BalloonType = msoBalloonTypeButtons
..Mode = msoModeModal
..Animation = msoAnimationEmptyTrash
..Show
End With
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=376703

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default Balloon button

Hi

Those are found in the Autoshapes section of the Drawing toolbar. Record
macros while creating / modifying for clues on code syntax.

HTH. Best wishes Harald

"sisco98" skrev i melding
...
good morning everybody,

i would like to use message balloons (like the help menu) in macro to
write
various messages/yes or no functions, etc. instead of messageboxes.
thanks in advance!
--
sisco98



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Balloon button

The difference, of course, is that message boxes have an OK button to
close them, whereas the user would have to manually delete the
autoshape to get rid of the message.

The other problem with programmatically setting the text for an
autoshape is sizing it. I haven't worked with the balloon shapes, but
I know that the autosize property for the flowchart shapes doesn't wrap
the text. So if you have a long message, setting the autosize property
will create a really wide, single-lined shape.

If you discover an easy way, let me know.

You may be able to make an API call (using GetTextMetics, I think) to
get the font characteristics then calculate the proper height and
width, though - if you want to take it that far.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Balloon button

Thank you very much for your help!
--
sisco98


"dominicb" wrote:


Good morning Sisco98

You can utilise the office assistant if you so wish. The code below
will give you an idea on how to start using it, so copy it inot a
module and have a tinker with it.

Sub Test()
With Assistant.NewBalloon
.Heading = "Look at me"
.Text = "Here's how I destroy rubbish. Do you like it?"
.Button = msoButtonSetYesNo
.BalloonType = msoBalloonTypeButtons
.Mode = msoModeModal
.Animation = msoAnimationEmptyTrash
.Show
End With
End Sub

HTH

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=376703




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Balloon button


Hi Sisco98

You're welcome. And thanks for the feedback.

DominicB


--
dominicb
------------------------------------------------------------------------
dominicb's Profile: http://www.excelforum.com/member.php...o&userid=18932
View this thread: http://www.excelforum.com/showthread...hreadid=376703

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,327
Default Balloon button


"Nick Hebb" skrev i melding
ups.com...
The difference, of course, is that message boxes have an OK button to
close them, whereas the user would have to manually delete the
autoshape to get rid of the message.


One button is easy; assign a macro to it. Quick and dirty sample:

Sub Test()
Dim s As Object
Set s = ActiveSheet.Shapes.AddShape(msoShapeRoundedRectang ularCallout, _
125.25, 63.75, _
88.5, 78.75)
s.Select
Selection.Characters.Text = "Hi folks." & Chr(10) & Chr(10) & _
"Yall OK then ? Click me if so."
s.OnAction = ThisWorkbook.Name & "!DeleteMe"
ActiveCell.Select
End Sub

Sub DeleteMe()
Dim s As Object
On Error Resume Next
Set s = ActiveSheet.DrawingObjects(Application.Caller)
s.Delete
End Sub

It's at Yes/No , Ok/Cancel the trouble begins.

Best wishes Harald


  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 162
Default Balloon button

s.OnAction = ThisWorkbook.Name & "!DeleteMe"

Coolness! I've only used OnAction for command bar buttons.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Balloon button

Hey folks, can anyone tell me how to re-activate the office assistant in
Excel 2007-I mean the Assistant has only been deprecated (hidden) so there
must be a way to 'unhide' that thing. Alternatively, can anyone shed any
light on what else can be used instead of balloons to let users make a
selection (i.e. chose printer) ?!?! Any help would be highly appreciated!!!!!

"sisco98" wrote:

good morning everybody,

i would like to use message balloons (like the help menu) in macro to write
various messages/yes or no functions, etc. instead of messageboxes.
thanks in advance!
--
sisco98

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
Comment balloon on a chart Anthony Blackburn Charts and Charting in Excel 1 May 13th 08 04:11 AM
New Balloon - VBA JohnM New Users to Excel 3 September 24th 06 06:56 PM
Help on the Assistant Balloon Christy[_6_] Excel Programming 0 November 3rd 03 01:06 PM
Balloon Assistant Christy[_5_] Excel Programming 0 November 3rd 03 01:05 PM


All times are GMT +1. The time now is 03:47 PM.

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

About Us

"It's about Microsoft Excel"