Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 144
Default Automating Text to Columns -- can I auto-click "OK" on the message

Hi,

As part of my code, I am performing a text to columns separation. During
this process, an Excel generated message comes up asking if I would like to
replace the contents of the cells in the columns where the data is being
separated to -- is there any way I can automate the clicking of "OK" on this
message box? Or not have it come up at all? Below is my code. Thanks!

With Sheets("Remove Dups")
.Columns("A:C").PasteSpecial
.Columns("B:B").Delete Shift:=xlToLeft
.Columns("B:B").TextToColumns Destination:=Range("A1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End With

--
Robert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Automating Text to Columns -- can I auto-click "OK" on the message

you can try

application,displayalerts = false
With Sheets("Remove Dups")
.Columns("A:C").PasteSpecial
.Columns("B:B").Delete Shift:=xlToLeft
.Columns("B:B").TextToColumns Destination:=Range("A1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End With
application.displayalerts = true

--


Gary


"robs3131" wrote in message
...
Hi,

As part of my code, I am performing a text to columns separation. During
this process, an Excel generated message comes up asking if I would like to
replace the contents of the cells in the columns where the data is being
separated to -- is there any way I can automate the clicking of "OK" on this
message box? Or not have it come up at all? Below is my code. Thanks!

With Sheets("Remove Dups")
.Columns("A:C").PasteSpecial
.Columns("B:B").Delete Shift:=xlToLeft
.Columns("B:B").TextToColumns Destination:=Range("A1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="|", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End With

--
Robert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Automating Text to Columns -- can I auto-click "OK" on the message

Typo in first line:
application,displayalerts = false
comma should be a period
application.displayalerts = false

Mike F
"Gary Keramidas" <GKeramidasATmsn.com wrote in message
...
you can try

application,displayalerts = false
With Sheets("Remove Dups")
.Columns("A:C").PasteSpecial
.Columns("B:B").Delete Shift:=xlToLeft
.Columns("B:B").TextToColumns Destination:=Range("A1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="|", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End With
application.displayalerts = true

--


Gary


"robs3131" wrote in message
...
Hi,

As part of my code, I am performing a text to columns separation. During
this process, an Excel generated message comes up asking if I would like
to
replace the contents of the cells in the columns where the data is being
separated to -- is there any way I can automate the clicking of "OK" on
this
message box? Or not have it come up at all? Below is my code. Thanks!

With Sheets("Remove Dups")
.Columns("A:C").PasteSpecial
.Columns("B:B").Delete Shift:=xlToLeft
.Columns("B:B").TextToColumns Destination:=Range("A1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="|", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
End With

--
Robert





Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Automatically "Click" Default Button on Message Boxes Dr. M Excel Programming 5 June 4th 10 03:57 PM
text string: "91E10" in csv file auto converts to: "9.10E+11" [email protected] Excel Discussion (Misc queries) 2 August 12th 08 03:13 PM
How can I Auto insert an "X" in a cell by just ONE left click???? Mac 5430 Excel Discussion (Misc queries) 3 April 14th 08 12:52 AM
Can I have "Shift-Click" or "Ctrl-Click" Code on Form List? MikeZz Excel Programming 0 June 13th 07 12:58 AM
I have to double click a cell for the "text" format to take Charles Excel Discussion (Misc queries) 2 January 24th 06 02:46 PM


All times are GMT +1. The time now is 02:35 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"