Solved

programmatically read a cell comment

Posted on 1998-12-07
2
222 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

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

How many times recently have you prepared a presentation or emailed a document to a client and you have found that they have older versions of MS Office and they can not open the file you have prepared.  Although most visitors to this site are exper…
Problem: You created a new custom form in Outlook for your contacts (added fields, deleted fields, changed the layout of fields, whatever) and made it the default form for contacts. The good news is that all new contacts will utilize the new form. T…
This video shows the viewer how to set up and create Footnotes in their document. Click on the References tab: Select "Insert Footnote": Type in desired text:
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…

744 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

11 Experts available now in Live!

Get 1:1 Help Now