Thread: Text to Columns
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
okaizawa okaizawa is offline
external usenet poster
 
Posts: 129
Default Text to Columns

Hi,

how about doing 'TextToColumns' again. for instance,

Sub Init_TextToColumns()
Application.ScreenUpdating = False
With Workbooks.Add(xlWorksheet).Worksheets(1)
.Range("A1").Value = "a"
.Range("A1").TextToColumns Destination:=.Range("A1"), _
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=False
.Parent.Close False
End With
Application.ScreenUpdating = True
End Sub


i know the setting of 'TextToColumns' and 'OpenText' affects pasting
text from clipboard. is there any other thing affected?

--
HTH,

okaizawa


Simon wrote:
I have a macro which parses a comma delimited string, but have just
discovered an issue (XL2000)...

The output from this macro is input for further processing BUT apparently the
default behaviour for Excel is that once the Text to Columns action has been
performed, to continue doing it... problem is, subsequent entries that
contain comma's are being automagickally parsed, with the result that some
data is then being overwritten (because it's parsed into the wrong columns).

is there some way to cancel this once the intial macro has been completed?

TIA

S