Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Insert Character in a String

i need to handle text in a shape with thousand of characters

when i insert a character or a string by character location,
the insert method replace the string from position 10 to 265 with "a"
it is not like an insert method
ActiveSheet.Shapes("Text Box 17").Characters(10).insert("a")

how to do the insert task correctly??



and seems i can not save more than 255 characters in a string
but as in documentation, a string can store up to billions of characters

dim temp as string
temp = ActiveSheet.Shapes("Text Box 17").Characters(Start:=6,
Length:=256).text

is this part of the code have error instead of the string?
ActiveSheet.Shapes("Text Box 17").Characters(Start:=6, Length:=256)

What i can think about is to cut the string part by part.. and merge it
finally.
Is there any better way to do this?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Insert Character in a String

Cut, append and merge would be the approach.

--
Regards,
Tom Ogilvy
"Laguna" wrote in message
...
i need to handle text in a shape with thousand of characters

when i insert a character or a string by character location,
the insert method replace the string from position 10 to 265 with "a"
it is not like an insert method
ActiveSheet.Shapes("Text Box 17").Characters(10).insert("a")

how to do the insert task correctly??



and seems i can not save more than 255 characters in a string
but as in documentation, a string can store up to billions of characters

dim temp as string
temp = ActiveSheet.Shapes("Text Box 17").Characters(Start:=6,
Length:=256).text

is this part of the code have error instead of the string?
ActiveSheet.Shapes("Text Box 17").Characters(Start:=6, Length:=256)

What i can think about is to cut the string part by part.. and merge it
finally.
Is there any better way to do this?



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
insert "-" as fourth character in number string cursednomore Excel Discussion (Misc queries) 2 February 7th 07 07:33 PM
Excel-Match 1st text character in a string to a known character? bushlite Excel Worksheet Functions 2 January 15th 07 06:36 PM
Function to return Character Position of Xth character within a string Andibevan[_2_] Excel Programming 4 June 9th 05 03:24 PM
Does Alt-Enter insert a non-printing character in a cell string? Henry Stock Excel Programming 3 February 23rd 05 09:28 PM
Macro to insert "0" in front of 4 character string Lowell B. Copeland[_2_] Excel Programming 2 August 29th 03 03:43 PM


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