LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default I need the original digit format with zeroes untrimmed

Hello,
My query is about how to retain an 8 digit format while copying data values
from one file to another.
I have a dbf file with one column containing 8 digit indexes. When I copy
some of those into an excelworksheet I get some of the indexes that start
with the zero trimmed, eg. 7063004 instead of 07063004. Now, it is
important that the indexes I copy are displayed and operated on as 8-digit
values (including the initial zeroes). How can I do that?

My macro does the following instruction
Dim IndeksVal As Long ' (I have also tried String) - this is a temporary
value
'[....]
IndeksVal = DbfData.Worksheets(1).Cells(oCell.Row, 1).Value
Application.ThisWorkbook.Worksheets(1).Cells(posco unter, INDX).Value =
IndeksVal

and the following direct assignent does not work either:
'[....]

Application.ThisWorkbook.Worksheets(1).Cells(posco unter, INDX).Value =
DbfData.Worksheets(1).Cells(oCell.Row, 1).Value


Other values that do not start with the zero, get copied "correctly".


Alvaro E. Gonzales


 
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
conditional format on first & last digit on 3 digit cell data caprey New Users to Excel 3 December 17th 08 05:24 PM
Format cells in web query (leading zeroes) Kathy Excel Discussion (Misc queries) 5 October 2nd 07 02:26 PM
Format 2 digit year to 4 digit RealGomer Excel Discussion (Misc queries) 5 December 14th 06 01:45 PM
how to keep leading zeroes when saving in xls in csv format Joe Excel Discussion (Misc queries) 2 October 5th 05 06:42 PM
single quote 10-digit number that has leading zeroes & then conca. lorelei739 Excel Worksheet Functions 1 November 5th 04 12:02 AM


All times are GMT +1. The time now is 02:42 AM.

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"