Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default reading comments value into a string variable

Can't find anywhere the syntax for reading a comment into a variable in order
to write it to another cell.
cmnt = ActiveCell.comment.Text
produces error msg
- object variable orWith block not set

Many TIA'S in advance

Matilda
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default reading comments value into a string variable

Check for a comment first.

if activecell.comment is nothing then
'do nothing
'cmnt = ""
'whatever you want
else
cmnt = activecell.comment.text
end if



Matilda wrote:

Can't find anywhere the syntax for reading a comment into a variable in order
to write it to another cell.
cmnt = ActiveCell.comment.Text
produces error msg
- object variable orWith block not set

Many TIA'S in advance

Matilda


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default reading comments value into a string variable


Thanks for coming to the rescue again, Dave

Matilda x
"Dave Peterson" wrote:

Check for a comment first.

if activecell.comment is nothing then
'do nothing
'cmnt = ""
'whatever you want
else
cmnt = activecell.comment.text
end if



Matilda wrote:

Can't find anywhere the syntax for reading a comment into a variable in order
to write it to another cell.
cmnt = ActiveCell.comment.Text
produces error msg
- object variable orWith block not set

Many TIA'S in advance

Matilda


--

Dave Peterson

Reply
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
Visual Basic 6 - String Reading V Govindan Excel Discussion (Misc queries) 2 December 7th 06 03:56 PM
sumproduct - reading a variable value redneck joe Excel Discussion (Misc queries) 3 May 24th 06 08:02 PM
Help with reading comments. Al Bundy Excel Programming 0 April 30th 04 01:05 AM
Reading Textfile into a variable Seth[_3_] Excel Programming 1 April 11th 04 08:46 PM
reading inside a text string ksnapp[_10_] Excel Programming 4 February 27th 04 09:55 PM


All times are GMT +1. The time now is 02:48 PM.

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

About Us

"It's about Microsoft Excel"