Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

comment position in excel 2000 1

Status
Not open for further replies.

cathy68

Programmer
Aug 6, 2003
23
0
0
NZ
Hi Guru
are there anyboyd know how to change the comment box position using VBA. Currently default comment box position is on the top right, is it changed to be under the cell or whatever?

thank you very much
 
Sorry - don't think it is doable via VBA.....can't see any positioning properties for comments

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Actually, comment is a shape. So, assuming that it is added to "D8", you can:

[tt]With Range("D8")
' read position of the cell
x = .Left
y = .Top
With .Comment.Shape
' move comment relative to the cell
.Left = x - 20
.Top = y + 50
End With
End With[/tt]

combo
 
cool - kudos to combo

Rgds, Geoff
[blue]Si hoc signum legere potes, operis boni in rebus Latinus alacribus et fructuosis potiri potes![/blue]
Want the [red]best[/red] answers to your questions ? faq222-2244
 
Geoff, after your comment, I tried to move a comment (xl) when an indicator only was displayed - nope.

Nec Hercules contra plures

combo
 
Hi combo
I tried your code. The funny thing is the comment box still in the same position, only I right click mouse, try to edit comment box, I can see its position changed. because I changed around the x, y value. it looks like the comment box having some default position to hold it, I am not sure. can you tell me why?

Cathy
 
Hi Cathy
It seems that comment has two positions. The first one is for editing and when the 'show comment' option is on - comment is always visible. Dragging the comment or using above code moves the it permanently (even if the comment box is invisible). The second position is where it popups while moving mouse over a cell. This seems to be fixed, related to the position of red dot comment indicator. As xlbo pointed, there is no positioning properties for this case.

combo
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top