Hi Good people. My numbers are being stored as text in a range of cells. I want to be able to convert them to integers via VBA code so far I have this:
For Each C In Selection
Selection.TextToColumns Destination:=Range(Selection), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
Next
This comes up with an Run-Time error '1004':
Method 'Range' of object'_Global failed.
I want to be able to code for an unknown range (what ever the user selects). I was thinking aout maybe using CInt( ), but I would still have the problem of referencing the selected range.
Any suggestions? Thanks DAVE
For Each C In Selection
Selection.TextToColumns Destination:=Range(Selection), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False, FieldInfo _
:=Array(1, 1), TrailingMinusNumbers:=True
Next
This comes up with an Run-Time error '1004':
Method 'Range' of object'_Global failed.
I want to be able to code for an unknown range (what ever the user selects). I was thinking aout maybe using CInt( ), but I would still have the problem of referencing the selected range.
Any suggestions? Thanks DAVE