Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Copying comments text to a cell using vba

Is it possible to copy the contents of a comments box to a cell on a
different sheet using VBA?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copying comments text to a cell using vba

Hi TommoUK,

Try something like:

'=============
Public Sub Tester001()
Dim SrcRng As Range
Dim destRng As Range
Dim cmt As Comment

Set SrcRng = ThisWorkbook.Sheets("Sheet1").Range("A1")
Set destRng = ThisWorkbook.Sheets("Sheet2").Range("B1")

Set cmt = SrcRng.Comment

destRng.Value = cmt.Text

Set cmt = Range("A1").Comment

End Sub
'<<=============


--
---
Regards,
Norman



"TommoUK" wrote in message
...
Is it possible to copy the contents of a comments box to a cell on a
different sheet using VBA?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Copying comments text to a cell using vba

Hi TommoUK.

Please delete the extraneous final line:

Set cmt = Range("A1").Comment


---
Regards,
Norman


"Norman Jones" wrote in message
...
Hi TommoUK,

Try something like:

'=============
Public Sub Tester001()
Dim SrcRng As Range
Dim destRng As Range
Dim cmt As Comment

Set SrcRng = ThisWorkbook.Sheets("Sheet1").Range("A1")
Set destRng = ThisWorkbook.Sheets("Sheet2").Range("B1")

Set cmt = SrcRng.Comment

destRng.Value = cmt.Text

Set cmt = Range("A1").Comment

End Sub
'<<=============


--
---
Regards,
Norman



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
Text Box contents to cell comments CoolBusiness Excel Discussion (Misc queries) 5 January 2nd 09 06:11 PM
Copying comments from one cell to another, in a different spreadsheet =!CmOrE!= Excel Worksheet Functions 4 July 25th 06 01:39 AM
UDF code to find specific text in cell comments, then average cell values bruch04 Excel Programming 3 December 5th 05 10:01 PM
Copying of cell text from one file to paste as cell comments in a 2nd file Wayne Excel Programming 4 March 2nd 05 05:05 AM
Copying comments from one cell to another Wayne Excel Programming 5 March 2nd 05 04:34 AM


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