Solved

programmatically read a cell comment

Posted on 1998-12-07
2
223 Views
Last Modified: 2006-11-17
i want to programmatically read a cell comment (in VB)

to write the comment, i can do, for example:
Range("A1").Comment.TEXT TEXT:="user:" & Chr(10) & "some words"

but there doesn't seem to be anything to read it back.
0
Comment
Question by:mickeydog
2 Comments
 
LVL 3

Accepted Solution

by:
frazer earned 50 total points
ID: 1614885
Hi,

This will assign the variable to 'a' and then display it in a message box....

Sub hello()
    Dim XL As New Excel.Application
    Dim wbk As Workbook
    Dim a As String
    Set wbk = XL.Workbooks.Add
    Range("A1").AddComment "Hello"
    a = Range("A1").Comment.Text
    MsgBox a
    Set wbk = Nothing
    Set XL = Nothing
End Sub


Hope this helps

Frazer
0
 

Author Comment

by:mickeydog
ID: 1614886
thanks!
hope there's no grading mixup this time!

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Office Picture Manager was included in Office 2003, 2007, and 2010, but not in Office 2013. Users had hopes that it would be in Office 2016/Office 365, but it is not. Fortunately, the same zero-cost technique that works to install it with …
Outlook Free & Paid Tools
The view will learn how to download and install SIMTOOLS and FORMLIST into Excel, how to use SIMTOOLS to generate a Monte Carlo simulation of 30 sales calls, and how to calculate the conditional probability based on the results of the Monte Carlo …
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now