Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Cell comment string trunckating

Hi,

Has anybody been able to read a comment of 600+
characters. I have not found any documentations saying
that this is not possible, but my strings trunckate at
random lengths.

Dim txt as string
txt = String(600," ")
txt = cells(1,1).comment.text()

The comment in cell(1,1) is very long, but it trunckates.
I am using Excel 2002 SP3. Anyone familiar with this
problem.

Thanks for the help.

Jose

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Cell comment string trunckating

This worked for me in xl2002:

Option Explicit
Sub testme01()

Dim myStr1 As String
Dim myStr2 As String

myStr1 = Application.Rept("asdf ", 1200)
MsgBox Len(myStr1)

With ActiveCell
If .Comment Is Nothing Then
'do nothing
Else
.Comment.Delete
End If
.AddComment Text:=myStr1
myStr2 = .Comment.Text
MsgBox Len(myStr2)
End With

End Sub

(I used 120*5=600 and it worked. I upped it to 1200 (1200*5) and it still
worked.)

Jose wrote:

Hi,

Has anybody been able to read a comment of 600+
characters. I have not found any documentations saying
that this is not possible, but my strings trunckate at
random lengths.

Dim txt as string
txt = String(600," ")
txt = cells(1,1).comment.text()

The comment in cell(1,1) is very long, but it trunckates.
I am using Excel 2002 SP3. Anyone familiar with this
problem.

Thanks for the help.

Jose


--

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
Can insert digital ink into Excel cell or a cell comment? Nickbray Excel Discussion (Misc queries) 1 June 2nd 10 03:53 AM
copy comment content to cell content as data not as comment Lilach Excel Discussion (Misc queries) 2 June 21st 07 12:28 PM
Create Cell Comment based on text in a cell on another worksheet Dave Fellman Excel Discussion (Misc queries) 2 March 15th 07 09:49 AM
a comment plugin & copy paste directly from excel to comment ? fr. RFM Excel Worksheet Functions 0 December 1st 04 11:29 PM
Create a formula into a String then assign string to a cell Myrna Larson[_2_] Excel Programming 6 August 23rd 03 09:42 PM


All times are GMT +1. The time now is 02:25 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"