Selasa, 08 Mei 2012

Re: [ExcelVBA] TextToColumns?

 

Hi Randy,
 
I tried what was proposed below and it seemed to work, but I have several macros where this was happening and have not checked the others yet.
 
Had you been able to replicate the problem? Thank you for the idea and I do think it is going to work in the rest. It was driving me crazier than I already am, lol.
 
Thanks,
David


________________________________
From: Randy Harmelink <rharmelink@gmail.com>
To: ExcelVBA@yahoogroups.com
Sent: Tuesday, May 8, 2012 8:35 AM
Subject: Re: [ExcelVBA] TextToColumns?


 

This worked for me:

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

Basically, just telling it to do the normal parsing as delimited, but with
no delimiters.

But it really isn't much different than what you have.

On Tue, May 8, 2012 at 7:07 AM, David Lanman <who1012000@yahoo.com> wrote:

> Hello Randy,
>
> Would you know the line of code that I should use to "reset the
> TextToColumns settings".
>
> Thank you very much. What I read via Google queries and using help in
> Excel did not help me find the answer.
>
> My first thought was that it was TextQualifier:. I have actually not tried
> this but maybe
> Selection.TextToColumns Destination:=Range(activecell.address),
> DataType:=xlDelimited, _
> TextQualifier:=xlNone, ConsecutiveDelimiter:=False, Tab:=False, _
> Semicolon:=False, Comma:=False, Space:=False, Other:=False,
> FieldInfo _
> :=Array(1, 1), TrailingMinusNumbers:=True
> (The above actually does nothing, but TextQualifier:=xlNone might work. I
> guess it is worth a try. Hoping someone had experienced the problem and had
> an answer.)
>
> Hope everyone is having a good day.
>

[Non-text portions of this message have been removed]

[Non-text portions of this message have been removed]

__._,_.___
Recent Activity:
----------------------------------
Be sure to check out TechTrax Ezine for many, free Excel VBA articles! Go here: http://www.mousetrax.com/techtrax to enter the ezine, then search the ARCHIVES for EXCEL VBA.

----------------------------------
Visit our ExcelVBA group home page for more info and support files:
http://groups.yahoo.com/group/ExcelVBA

----------------------------------
More free tutorials and resources available at:
http://www.mousetrax.com

----------------------------------
.

__,_._,___

Tidak ada komentar:

Posting Komentar