ToolTipText for shapes

S

Sven

Hello,

is it possible to set the ToolTipText for each shape or is
this only for command bars and buttons possible?

Thanks
Sven
 
D

Derl

You can change the tool tip easily through code too:

theText = "Tool Tip Text"
shpObj.Cells("Comment").Formula = theText

====
 
S

sven

Hello,

Yes it's working.
Is it possible to set a text with line feed (vbCr or
vbCrLf) ?

Thanks,
Sven
 
A

al

I don't believe you can do that at 2002 (I have to go to
my other system to test it) and below, it was limited to a
single line. The 2003 beta does allow multiline comments.
al
 
D

Derl

I've got professional 2002: Try this

theText = "This is line 1" & vbLf _
& "this is line 2" & vbLf _
& "this is line 3"
shpObj.Cells("Comment").Formula = theText

Also, putting text into the tool tip can sometimes get weird. In one thing
I'm doing I had to do the following:
tipText = "Some Text"
theText = Chr(61) & Chr(34) & tipText & Chr(34) ' which is basically saying
=" tipText " where tipText is in "" so its "="tipText"" or something like
that.
shpObj.Cells("Comment").Formula = theText
You may have to experiment. I saw something similar being discussed on a
visio forum site.

Also, it appears that there is a limit to the amount of text you can put in
a tooltip (around 600 characters).
 
S

Sven

Hello Derl,

Thank You, it is working:

ToolTipText = "this is line 1" & vbLf _
& "this is line 2" & vbLf _
& "this is line 3" & vbLf _
& "this is line 4"
Shape.Cells("Comment").Formula = "=""" & ToolTipText & """"

The weirdness are the """". But it's working. :)

Sven
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top