Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 220
Default Text is Truncated With String Variable

If I do this:

Dim theTxt as String

theTxt = Activesheet.Cells(1,1).Text

for some reason the text (which is actually 1849 characters long) is
truncated to 1024 characters.

If I do this:

Dim theTxt as Variant

theTxt = Activesheet.Cells(1,1)

I get the complete text string from the cell.

Can someone tell me why these two approaches are giving me different results?

Thanks,

Eric

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Text is Truncated With String Variable

One uses the .text property, the other uses the default property (.value).



EricG wrote:

If I do this:

Dim theTxt as String

theTxt = Activesheet.Cells(1,1).Text

for some reason the text (which is actually 1849 characters long) is
truncated to 1024 characters.

If I do this:

Dim theTxt as Variant

theTxt = Activesheet.Cells(1,1)

I get the complete text string from the cell.

Can someone tell me why these two approaches are giving me different results?

Thanks,

Eric


--

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
Text strings from a variable string Ferdy New Users to Excel 1 October 26th 09 07:41 PM
find a variable text string [email protected] Excel Discussion (Misc queries) 2 January 30th 07 07:20 PM
TextFrame.Characters.Text returns truncated string Dennis Excel Programming 2 October 1st 06 11:23 PM
variable amount truncated regardless of # of decimals Jon Workman[_2_] Excel Programming 0 April 19th 06 06:51 PM
Getting text file into a VBA string variable Don Wiss Excel Programming 10 January 7th 05 12:42 AM


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