ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Notes text 255 characters (https://www.excelbanter.com/excel-programming/320802-notes-text-255-characters.html)

Matt Jensen[_2_]

Notes text 255 characters
 
Howdy
In the VBE type the text 'notetext' and Hit F1 - in the help's REMARKS
it says:

"To add a note that contains more than 255 characters, use this method
once to specify the first 255 characters, and then use it again to
append the remainder of the note (no more than 255 characters at a
time)."

I am unsure how to do this, as specifying the notetext twice with
different text only keeps the second set of text.
eg.
If Len(vaProductsRange(i, 4)) 255 And Len(vaProductsRange(i, 4)) <
510 Then
cellUnder.Offset(0, 1).NoteText Left(vaProductsRange(i, 4), 255)
cellUnder.Offset(0, 1).NoteText Mid(vaProductsRange(i, 4), 256, 255)
ElseIf Len(vaProductsRange(i, 4)) <= 255 Then
cellUnder.Offset(0, 1).NoteText vaProductsRange(i, 4)
End If
What code would I need to use to correctly append it?
Thanks
Matt


Tom Ogilvy

Notes text 255 characters
 
If Len(vaProductsRange(i, 4)) 255 And Len(vaProductsRange(i, 4)) <
510 Then
cellUnder.Offset(0, 1).NoteText Left(vaProductsRange(i, 4), 255),1,255
cellUnder.Offset(0, 1).NoteText Mid(vaProductsRange(i, 4), 256, 255),256,255
ElseIf Len(vaProductsRange(i, 4)) <= 255 Then
cellUnder.Offset(0, 1).NoteText vaProductsRange(i, 4)
End If

--
Regards
Tom Ogilvy


"Matt Jensen" wrote in message
oups.com...
Howdy
In the VBE type the text 'notetext' and Hit F1 - in the help's REMARKS
it says:

"To add a note that contains more than 255 characters, use this method
once to specify the first 255 characters, and then use it again to
append the remainder of the note (no more than 255 characters at a
time)."

I am unsure how to do this, as specifying the notetext twice with
different text only keeps the second set of text.
eg.
If Len(vaProductsRange(i, 4)) 255 And Len(vaProductsRange(i, 4)) <
510 Then
cellUnder.Offset(0, 1).NoteText Left(vaProductsRange(i, 4), 255)
cellUnder.Offset(0, 1).NoteText Mid(vaProductsRange(i, 4), 256, 255)
ElseIf Len(vaProductsRange(i, 4)) <= 255 Then
cellUnder.Offset(0, 1).NoteText vaProductsRange(i, 4)
End If
What code would I need to use to correctly append it?
Thanks
Matt




Matt Jensen[_2_]

Notes text 255 characters
 
Legend! - thanks Tom
Cheers
Matt



All times are GMT +1. The time now is 07:30 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com