Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Help with Macro

Is it correct that cells only show 250 characters? I need a macro that will
copy all the contents of a cell and paste into a comment so the users can
read the entire block of information by hovering over the cell. I then need
this to be done automatically to each and every cell with text. I then need
the macro to update all cells and comments automatically once the cell has
been edited.

Does this make sense? Please help.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 791
Default Help with Macro

You must format your cells as text and also use the wrap functionality
available in the Aligment Tab under the format cells menu.
--
If this posting was helpful, please click on the Yes button.
Regards,

Michael Arch.




"shell" wrote:

Is it correct that cells only show 250 characters? I need a macro that will
copy all the contents of a cell and paste into a comment so the users can
read the entire block of information by hovering over the cell. I then need
this to be done automatically to each and every cell with text. I then need
the macro to update all cells and comments automatically once the cell has
been edited.

Does this make sense? Please help.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default Help with Macro

Put this event macro in the worksheet code area:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim c As Comment, r As Range
Application.EnableEvents = False
If ActiveSheet.Comments.Count 0 Then
For Each c In ActiveSheet.Comments
c.Delete
Next
End If
For Each r In ActiveSheet.Cells.SpecialCells(xlCellTypeConstants )
r.AddComment
r.Comment.Visible = False
r.Comment.Text Text:=r.Text
Next
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm




--
Gary''s Student - gsnu200820


"shell" wrote:

Is it correct that cells only show 250 characters? I need a macro that will
copy all the contents of a cell and paste into a comment so the users can
read the entire block of information by hovering over the cell. I then need
this to be done automatically to each and every cell with text. I then need
the macro to update all cells and comments automatically once the cell has
been edited.

Does this make sense? Please help.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 22,906
Default Help with Macro

See your earlier post replies.


Gord Dibben MS Excel MVP

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

Is it correct that cells only show 250 characters? I need a macro that will
copy all the contents of a cell and paste into a comment so the users can
read the entire block of information by hovering over the cell. I then need
this to be done automatically to each and every cell with text. I then need
the macro to update all cells and comments automatically once the cell has
been edited.

Does this make sense? Please help.


Reply
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
Macro recorded... tabs & file names changed, macro hangs Steve Excel Worksheet Functions 3 October 30th 09 11:41 AM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
Macro not showing in Tools/Macro/Macros yet show up when I goto VBA editor [email protected] Excel Programming 2 March 30th 07 07:48 PM
how to count/sum by function/macro to get the number of record to do copy/paste in macro tango Excel Programming 1 October 15th 04 01:16 PM
Start Macro / Stop Macro / Restart Macro Pete[_13_] Excel Programming 2 November 21st 03 05:04 PM


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