What does "Application-defined or object-defined error" mean?

S

Shatin

When I try to run the following one line macro, I got the error msg
that "Application-defined or object-defined error". It must be
something simple but I am completely clueless as to what the mistake
is.

Columns(1).TextToColumns Destinations:=Range("B1"),
ConsecutiveDelimiter:=True, Space:=True
 
D

Doug Glancy

Shatin,

I think you meant "Destination" (singular, not plural). Then it works for
me.

hth,

Doug
 
A

acw

Hi

Change Destinations:=Range("B1") to Destination:=Range("B1")
You have an extra "s" at the end of Destination

Tony

----- Shatin wrote: -----

When I try to run the following one line macro, I got the error msg
that "Application-defined or object-defined error". It must be
something simple but I am completely clueless as to what the mistake
is.

Columns(1).TextToColumns Destinations:=Range("B1"),
ConsecutiveDelimiter:=True, Space:=True
 
B

Bob Phillips

Yes, be more careful<vbg>

Seriously though, mistakes happen. Intellisense should help guide you so
that only correct syntax is input. The other thing is that when you get an
error, try (at least) 2 things
1 - check the syntax in help
2 - break the problem down and check the component parts individually.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top