D
Dave
The following has a user enter a named range in an
InputBox
The range is then copied to EG3 on sheet A
It all works fine except: The contents of the range are
mostly numbers that are preceded with a single quote and
a zero. e.g. '020140
When the contents are copied over, it comes over as a
number 20140 I need it with the preceding '0
??
Thanks for any help given.
Dave
Here is the snippet of code:
Range("b6").Select
cv = ActiveCell.Value
Dim rng As Range
Dim strRangeName As String
strRangeName = InputBox("Enter Construction
Name", "Construction", cv, 1, 1)
Set rng = Worksheets("CONSTABL").Names
(strRangeName).RefersToRange
Dim cell As Range
Dim rngTarget As Range
Set rngTarget = Worksheets("A").Range("EG3")
Dim i As Integer
For Each cell In rng
rngTarget.Offset(i, 0).Value = cell.Value
i = i + 1
Next
InputBox
The range is then copied to EG3 on sheet A
It all works fine except: The contents of the range are
mostly numbers that are preceded with a single quote and
a zero. e.g. '020140
When the contents are copied over, it comes over as a
number 20140 I need it with the preceding '0
??
Thanks for any help given.
Dave
Here is the snippet of code:
Range("b6").Select
cv = ActiveCell.Value
Dim rng As Range
Dim strRangeName As String
strRangeName = InputBox("Enter Construction
Name", "Construction", cv, 1, 1)
Set rng = Worksheets("CONSTABL").Names
(strRangeName).RefersToRange
Dim cell As Range
Dim rngTarget As Range
Set rngTarget = Worksheets("A").Range("EG3")
Dim i As Integer
For Each cell In rng
rngTarget.Offset(i, 0).Value = cell.Value
i = i + 1
Next