LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 175
Default Help with syntax on IF-Then for CellComment

I have a macro that will run when the user clicks a button to Find a
Record. He enters a PO#, and all the fields for that record will appear
on a UserForm.
Everything works well, except that one of the textboxes is for any cell
comment in one of the fields.

The UserForm will display the cell comment OK, but if there is no cell
comment in that cell, then there is an error.

So, I want to add a line of code that will test if there IS any cell
comment. If there is, then it can be entered in TextBox8. There is no
need for an Else part of the statement. Here is what I have now....

If Comment.Text = True Then
TextBox8.Value = ActiveCell.Comment.Text

End If

It worked ok until I attempted to incorporate an IF-Then statement.
I'm sure it's the 1st line that is the problem. I'm guessing on
the syntax. Comment.Text = True

The 2nd line works ok by itself. (When there IS a cell comment
available)

Any suggestions?

Thanks,
J.O.

 
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
Help with Syntax Steve Excel Discussion (Misc queries) 2 June 21st 07 06:52 PM
look up syntax Pierre[_16_] Excel Programming 2 July 11th 05 09:01 PM
Need help with Syntax Marty Excel Programming 6 June 22nd 04 02:38 AM
Help with VBA syntax jacqui[_2_] Excel Programming 3 January 13th 04 02:29 PM
syntax Don[_13_] Excel Programming 2 November 16th 03 03:30 AM


All times are GMT +1. The time now is 08:45 AM.

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

About Us

"It's about Microsoft Excel"