LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Help writing macro

A cell can hold 32767 characters but only 1024 of those will be visible in
the cell so your 250 is incorrect.

To add a Comment to a cell with the text from that cell.

Sub Comment_Add()
Dim cmt As Comment
Dim r As Range
For Each r In Range("D3:D100") 'adjust to suit
Set cmt = r.Comment
If cmt Is Nothing Then
Set cmt = r.AddComment
cmt.Text Text:=r.Text
End If
Next r
End Sub


Gord Dibben MS Excel MVP

On Thu, 11 Dec 2008 09:29:01 -0800, shell
wrote:

I have a user that needs to be able to hover over a cell and see the entire
contents of the cell. We thought it might be beneficial to create a macro
that would copy the entire contents of the cell and create a comment (since
the cells only show 250 characters and comments can hold more). We would
need this for each and every cell. Any ideas? I need this ASAP. Thanks.


 
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
Help with writing macro Bertha needs help[_2_] Excel Programming 4 August 1st 08 03:23 PM
help writing a macro please! mcarter Excel Programming 1 July 30th 08 09:50 PM
Writing a macro RB[_2_] Excel Worksheet Functions 0 January 14th 08 05:40 PM
Macro Writing rjamison Excel Programming 0 June 14th 05 12:14 AM


All times are GMT +1. The time now is 05:52 AM.

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"