Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a number of cells where I would like to copy the cell contents to a
(new) comment. I recorded a macro to do this, but it includes the specific cell position. How can I refer to the current cell position? Sub Cell_text_to_comment() ' ' Cell_text_to_comment Macro ' Copy cell text to comment Macro recorded 03/03/2009 ' ' Keyboard Shortcut: Ctrl+Shift+C ' Range("J83").AddComment Range("J83").Comment.Visible = False Range("J83").Comment.Text Text:="R Curtis:" & Chr(10) & "Diode BAV10" Range("J83").Select End Sub I'm not a programmer, so please keep things simple. -- Richard Search the web and raise money for charity at www.everyclick.com |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Let's use the active cell. This will copy its contents into a comment:
Sub Cell_text_to_comment() With ActiveCell .AddComment .Comment.Visible = False .Comment.Text Text:=.Value End With End Sub -- Gary''s Student - gsnu200835 "RichUE" wrote: I have a number of cells where I would like to copy the cell contents to a (new) comment. I recorded a macro to do this, but it includes the specific cell position. How can I refer to the current cell position? Sub Cell_text_to_comment() ' ' Cell_text_to_comment Macro ' Copy cell text to comment Macro recorded 03/03/2009 ' ' Keyboard Shortcut: Ctrl+Shift+C ' Range("J83").AddComment Range("J83").Comment.Visible = False Range("J83").Comment.Text Text:="R Curtis:" & Chr(10) & "Diode BAV10" Range("J83").Select End Sub I'm not a programmer, so please keep things simple. -- Richard Search the web and raise money for charity at www.everyclick.com |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
That's just what I need. Thanks!
-- Richard Search the web and raise money for charity at www.everyclick.com "Gary''s Student" wrote: Let's use the active cell. This will copy its contents into a comment: Sub Cell_text_to_comment() With ActiveCell .AddComment .Comment.Visible = False .Comment.Text Text:=.Value End With End Sub -- Gary''s Student - gsnu200835 "RichUE" wrote: I have a number of cells where I would like to copy the cell contents to a (new) comment. I recorded a macro to do this, but it includes the specific cell position. How can I refer to the current cell position? Sub Cell_text_to_comment() ' ' Cell_text_to_comment Macro ' Copy cell text to comment Macro recorded 03/03/2009 ' ' Keyboard Shortcut: Ctrl+Shift+C ' Range("J83").AddComment Range("J83").Comment.Visible = False Range("J83").Comment.Text Text:="R Curtis:" & Chr(10) & "Diode BAV10" Range("J83").Select End Sub I'm not a programmer, so please keep things simple. -- Richard Search the web and raise money for charity at www.everyclick.com |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
lookup cell reference and copy contents and comment from a range | Excel Worksheet Functions | |||
Macro to Copy and Paste Cell Contents | Excel Programming | |||
Macro - copy cell contents IF | Excel Programming | |||
Macro to copy cell contents number of columns | Excel Programming | |||
Copy cell contents into Macro code | Excel Programming |