Notes text >255 characters

M

Matt Jensen

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
 
T

Tom Ogilvy

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top