Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Comment Question

Hello again. I would like to copy any comments from a source worksheet to a report worksheet if they occur. The user chooses a row from a listbox and then a report worksheet is generated based on what is selected. The report page is similar to the format below

Assignment Points Comment

Test 1 9
Test 2 Absen
Test 3 85
Test 4 Absen

I've tried sooo many things but can't seem to get to the comment part to work. Any advice would be appreciated
Thanks again

Robbyn
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Comment Question

It would be easier to address this if you had posted the code that does the
report, but basically you can test if the cell has a comment (assuming you
mean the Insert=Comment type comment and not just text entered in a cell).

Sub Tester1()
Dim cmt As Comment
Dim sStr As String
Set cmt = Nothing
On Error Resume Next
Set cmt = ActiveCell.Comment
On Error GoTo 0
If Not cmt Is Nothing Then
sStr = cmt.Shape.TextFrame.Characters.Text
Worksheets("Report").Cells(1, 1).Value = sStr
End If
End Sub

--
Regards,
Tom Ogilvy



Robbyn wrote in message
...
Hello again. I would like to copy any comments from a source worksheet to

a report worksheet if they occur. The user chooses a row from a listbox and
then a report worksheet is generated based on what is selected. The report
page is similar to the format below:

Assignment Points Comments

Test 1 90
Test 2 Absent
Test 3 85
Test 4 Absent

I've tried sooo many things but can't seem to get to the comment part to

work. Any advice would be appreciated.
Thanks again.

Robbyn



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Comment Question

Tom, your code pointed me in the right direction. Thanks much! (again

Robbyn
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
Question: Is it possible to link a cell to a comment box window? Kent Excel Discussion (Misc queries) 3 November 5th 07 07:56 PM
Question: Is it possible to link a cell to a comment box window? Kent Excel Discussion (Misc queries) 0 November 5th 07 06:37 PM
COMMENT question . . . kinda. :) Wayne Knazek Excel Discussion (Misc queries) 0 August 17th 06 10:00 PM
How can I edit a comment w/o first having to select Show Comment Mary Ann Excel Discussion (Misc queries) 1 August 26th 05 12:34 AM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM


All times are GMT +1. The time now is 02:09 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"