Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Microsoft Office > Excel VBA > Excel VBA
Password Reminder
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
Excel VBA Discuss using VBA for Excel programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Excel VBA section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old December 27th, 2003, 03:13 PM
Authorized User
Join Date: Dec 2003
Location: Brussels, , Belgium.
Posts: 20
Thanks: 0
Thanked 0 Times in 0 Posts
Default Check comment or not

Hello all,
Is there a way to check if there is a comment or not set on a cell?
I tried several ways but there were unsuccessful.
Many Thanx
Reply With Quote
  #2 (permalink)  
Old January 9th, 2004, 06:20 PM
Registered User
Join Date: Jan 2004
Location: Versailles, , France.
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts


You can try the following:

Function CheckComment(CC As Range) As Boolean
    Dim Com As Comment

    ' trap error
    On Error Resume Next
    ' try to get comment if any
    Set Com = CC.Comment
    ' Restore error management
    On Error GoTo 0
    ' Check if comment
    If Com Is Nothing Then
        CheckComment = False
        CheckComment = True
    End If
End Function

Hope this will help.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
download 1.3 javadoc comment hombre BOOK: Beginning Java 2 0 December 18th, 2007 11:57 AM
Removing comment coding Ray Pinnegar Access 2 November 15th, 2004 02:44 PM
Help me about write a comment. fujinova JSP Basics 0 October 1st, 2003 08:22 PM

All times are GMT -4. The time now is 11:33 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.