Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
DEE DEE is offline
external usenet poster
 
Posts: 250
Default HELP!

Hi,

I was working with some code this week and, after some very kind help, ended
up with the following. My objective is to display comments in the worksheet
when click or otherwise activate a cell that contains comments. (I don't
want the users to have to point to the cell to see the comment.)

The problems a 1. When one of the users runs the code, he gets a
runtime error 91 and the code only works for one comment. 2. When I run
the code, it seems to work for only one comment. When I tab to other cells
that contain comments, it displays them, but leaves them displayed when I
leave the cell instead of hiding them.

Any help would be GREATLY appreciated.

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Set r = ActiveSheet.UsedRange.SpecialCells(xlCellTypeComme nts)
r.Comment.Visible = False
If Intersect(Target, r) Is Nothing Then
Exit Sub
End If
Target.Comment.Visible = True
End Sub

--
Thanks!

Dee
 
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



All times are GMT +1. The time now is 04:19 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"