Comments

  • Thread starter Thread starter kirkm
  • Start date Start date
K

kirkm

Is is possible to show a Comment by code instead of mousing over
it ??
If yes, can its display position be changed at all ?

Thanks - Kirk
 
Kirk,

Try code such as the following:

With Range("E9")
If Not .Comment Is Nothing Then
With .Comment
With .Shape
.Top = Range("E11").Top
.Left = Range("G11").Left
.Height = 100
.Width = 100
End With
.Visible = True
End With
End If
End With

Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group, 1998 - 2009
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)
 
With Range("E9")
If Not .Comment Is Nothing Then
With .Comment
With .Shape
.Top = Range("E11").Top
.Left = Range("G11").Left
.Height = 100
.Width = 100
End With
.Visible = True
End With
End If
End With

Thanks Chip, I had a lot of fun -and success - with
your routine. It showed me quite a lot... however I havent
quite got Top and Left working as needed.

The comment should show beside a Form, against its RH side
and Form Top. I can use absolute values, but anyone else using my
workbook may have a different screen resolution - which
presumable would want different values.

The Form is centered (StartUpPosition 1 - CenterOwner) and
I've been trying to use Frm.Width and .Top in place of
Range("E11") and Range("G11").

Maybe you know someway this can be done?
I've been playing with Set rng = ActiveWindow.VisibleRange
and rng.Top - left - height etc. But I've a long way to go !

Also - do you know - can the comment be turned off without
needing to calcualting a Range?

Thanks - Kirk
 
Back
Top