Selasa, 08 Mei 2012

Re: [ExcelVBA] TextToColumns?

 

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.
 
Thanks,
David


________________________________
From: Randy Harmelink <rharmelink@gmail.com>
To: ExcelVBA@yahoogroups.com
Sent: Monday, May 7, 2012 8:37 PM
Subject: Re: [ExcelVBA] TextToColumns?


 

TextToColumns has "sticky" settings.

So, yes, pasting something like that will be split up based on your last
TextToColumns operation.

Just reset the TextToColumns settings and everything should work as you
want.

It's a "feature". :)

On Mon, May 7, 2012 at 11:40 AM, David <who1012000@yahoo.com> wrote:

>
> After run some code, if I simply Ctrl+C something and CTRl+V, the formula
> ends up in multple cells.
>
> I am not really certain that it is caused by part of the code performing a
> TestToColumns, but seems a likely suspect.
>
> I can not stop this unless I shut Excel down and restart it.
>
> Any Ideas? Can I add a line of code to stop this from happening, maybe
> just before exiting the code?
>
> I looked through the parameters, most of which are "False" by default, but
> maybe after running the code I would have to set them all again to False?
>
> I am not at all certain that it is TextToColumns at fault. But I thought
> maybe someone else had run into this?
>
> Using V2003.
>

[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