Thread
:
String variables
View Single Post
#
3
Posted to microsoft.public.excel.programming
Burnnie Holliday
external usenet poster
Posts: 17
String variables
Okay... I don't really feel that was necessary to answer the question.
does:
Dim ThisVar as String
ThisVar = "ABCDEF"
take more memory than this:
Dim ThisVar as String * 6
ThisVar = "ABCDEF"
The entirety of the code in question is 221 lines long, and no, this is not
a direct excerpt. A direct excerpt isn't necessary to answer the question,
since the question is not about code, but how Excel handles variable
declaration.
--
Burnnie Holliday
Data Wrangler
"Don Guillett" wrote:
As ALWAYS , post your code for comments.
--
Don Guillett
Microsoft MVP Excel
SalesAid Software
"Burnnie Holliday" wrote in
message ...
I understand that a string variable size is 10 bytes + string length. Does
this mean that a a variable-length string which happens to have a length
of 6
occupies the same amount of memory as a fixed-length string of the same
size
(16 bytes), or does Excel assign a memory block capable of suiting a much
larger string when a variable-length string is declared?
I'm asking because I'm dealing with a macro that creates a string array
listing the types of products it has recorded data for, and it seems to be
occupying a surprising amount of processor time.
--
Burnnie Holliday
Data Wrangler
.
Reply With Quote
Burnnie Holliday
View Public Profile
Find all posts by Burnnie Holliday