Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Discover the cell address of an attached comment?

I am trying to read information from a comment and then get the address of
the cell the comment is attached to before writing the information into the
same cell in an other workbook. So for instance, If comment(1) in
workbook(a).worksheet(a) is @ range("I92") then I want to write comment(1)'s
string to workbook(b).worksheet(?).range("I92")

I've been attempting to use:

Workbooks("b").Worksheets("b").Activate
ActiveSheet.Range(CellComnt.Parent.Column & CellComnt.Parent.row).text =
Workbooks("a").Worksheets("a").Comments(1).Text

with no success. Please, I'm exasperated, can someone help? (I'm using Excel
2003)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,355
Default Discover the cell address of an attached comment?

I got this to write the comments on worksheet 1 (the activesheet) to
worksheet 2.

Sub FindComments()
Dim CellCmnt As Comment

Dim aWS As Worksheet
Set aWS = ActiveSheet 'Which happens to be Worksheets(1)
Set oWS = Worksheets(2)

For Each CellCmnt In aWS.Comments
oWS.Range(CellCmnt.Parent.Address).Value = CellCmnt.text
Next CellCmnt

End Sub

--
HTH,
Barb Reinhardt

If this post was helpful to you, please click YES below.



"MiD-AwE" wrote:

I am trying to read information from a comment and then get the address of
the cell the comment is attached to before writing the information into the
same cell in an other workbook. So for instance, If comment(1) in
workbook(a).worksheet(a) is @ range("I92") then I want to write comment(1)'s
string to workbook(b).worksheet(?).range("I92")

I've been attempting to use:

Workbooks("b").Worksheets("b").Activate
ActiveSheet.Range(CellComnt.Parent.Column & CellComnt.Parent.row).text =
Workbooks("a").Worksheets("a").Comments(1).Text

with no success. Please, I'm exasperated, can someone help? (I'm using Excel
2003)

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
How to discover the difference Mike Blakeley Excel Worksheet Functions 6 April 14th 09 06:15 PM
COUNTIF to count cells that have an attached comment Stonewall Rubberbow Excel Discussion (Misc queries) 5 January 9th 07 10:01 AM
discover format of Excel Cell using VBA Ron Kendall Excel Programming 1 April 3rd 06 05:39 PM
form in excel to be attached to the emails address in the form upon sumission Abdulkader Bhanpurawala via OfficeKB.com Excel Programming 6 July 10th 05 10:48 AM
discover cell causing column width no bosh Excel Programming 5 March 3rd 05 08:11 PM


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