A
alfonso gonzales
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(poscounter, INDX).Value =
IndeksVal
and the following direct assignent does not work either:
'[....]
Application.ThisWorkbook.Worksheets(1).Cells(poscounter, 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
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(poscounter, INDX).Value =
IndeksVal
and the following direct assignent does not work either:
'[....]
Application.ThisWorkbook.Worksheets(1).Cells(poscounter, 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