H
Haarish
Hi All,
I have a requirement where I might need to replace the text in Cells
for particular columns. I have a form where I get the input from the
user asking them the fields they would want me to replace the text in.
I store the column numbers in a variant array. I then do an iteration
which is something like
Do While (intFieldCount <= UBound(vUpdFieldsCol))
strCol = Left(Cells(1, vUpdFieldsCol
(intFieldCount)).Address(False, False), 1 - (vUpdFieldsCol
(intFieldCount) > 26))
If (Len(strSelection) = 0) Then
strSelection = strSelection & strCol & "9:" &
strCol & intRngEnd
Else
strSelection = strSelection & "," & strCol &
"9:" & strCol & intRngEnd
End If
intFieldCount = intFieldCount + 1
Loop
But after the strSelection construction has been completed I do a
Sheet.Range(strSelection).select which fails and when I debug the
value of strSelection, I find the value has not been completely picked
up. I checked to see the limit of the datatype string and my values
are just a miniscule fraction of the 2 billion characters. Am I
missing something, can you guys let me know whats wrong with what I
have written?
Thanks and Regards,
Haarish.
I have a requirement where I might need to replace the text in Cells
for particular columns. I have a form where I get the input from the
user asking them the fields they would want me to replace the text in.
I store the column numbers in a variant array. I then do an iteration
which is something like
Do While (intFieldCount <= UBound(vUpdFieldsCol))
strCol = Left(Cells(1, vUpdFieldsCol
(intFieldCount)).Address(False, False), 1 - (vUpdFieldsCol
(intFieldCount) > 26))
If (Len(strSelection) = 0) Then
strSelection = strSelection & strCol & "9:" &
strCol & intRngEnd
Else
strSelection = strSelection & "," & strCol &
"9:" & strCol & intRngEnd
End If
intFieldCount = intFieldCount + 1
Loop
But after the strSelection construction has been completed I do a
Sheet.Range(strSelection).select which fails and when I debug the
value of strSelection, I find the value has not been completely picked
up. I checked to see the limit of the datatype string and my values
are just a miniscule fraction of the 2 billion characters. Am I
missing something, can you guys let me know whats wrong with what I
have written?
Thanks and Regards,
Haarish.