View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Keep leading zeros in a string array

Depends on how you copy cells into a string array. If you do it all at
once, then you are transferring the values and the only way to do it would
be to change the value of the cell (or loop through the array and change the
value stored in the array).

If you are looping through cells and making the assignment element by
element, then use the Text property of the cell rather than the Value
property.

--
Regards,
Tom Ogilvy

"quartz" wrote in message
...
When I copy cell contents that looks like "00030" into a string array,

then
later check the array contents it looks like: "30". I need to keep the
leading zeros in the variable. Anyone have a quick and easy way to do

this?