If nothing found ...

  • Thread starter Thread starter Annette
  • Start date Start date
A

Annette

Another if statements ...

sometimes there is no text that qualifies so this errors out. I need an if
statement that if no text is found in the selection, skip the next section
and move along as written. here's the code:



Range(Selection, Selection.End(xlDown)).Select

Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited,
_
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar
_
:="/", FieldInfo:=Array(Array(1, 1), Array(2, 1))

Thanks, Annette
 
Hi Annette
You may try adding
on error resume next
before this code snipptet

and
on error goto 0
after the last line of your code
 
Again ... Perfect! Thanks and I think that the main macro is now finished.
Just have one final question to post and I'm done!
 
Annette said:
Again ... Perfect! Thanks and I think that the main macro is now
finished. Just have one final question to post and I'm done!

:-) only one?
thanks for the feedback
Frank
 
Back
Top