View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
maperalia maperalia is offline
external usenet poster
 
Posts: 258
Default Statement to ignore step if does not find text to Split

How can I put a statement that if the macro does not find text to split when
I call text to column; just ignore it and continue with the program?
The problem is that I got the following message when the macro does not find
data:

Run-Time Error'1004':
No data was selected to parse

Then when I click debug it is highlighting at the following statement:

Selection.TextToColumns Destination:=Range("A1"), DataType:=xlFixedWidth, _
FieldInfo:=Array(Array(0, 1), Array(1, 1)), TrailingMinusNumbers:=True

Thanks in advance.
Maperalia