Solved

programmatically read a cell comment

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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

This article will show you how to use shortcut menus in the Access run-time environment.
My experience with Windows 10 over a one year period and suggestions for smooth operation
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
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…

792 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