PC Review


Reply
Thread Tools Rate Thread

Automating Text to Columns -- can I auto-click "OK" on the message

 
 
=?Utf-8?B?cm9iczMxMzE=?=
Guest
Posts: n/a
 
      1st Jul 2007
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 With Quote
 
 
 
 
Gary Keramidas
Guest
Posts: n/a
 
      1st Jul 2007
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" <(E-Mail Removed)> wrote in message
news:CF384DF7-73D0-47E7-B59E-(E-Mail Removed)...
> 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 With Quote
 
Mike Fogleman
Guest
Posts: n/a
 
      1st Jul 2007
Typo in first line:
application,displayalerts = false
comma should be a period
application.displayalerts = false

Mike F
"Gary Keramidas" <GKeramidasATmsn.com> wrote in message
news:eW$(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
> news:CF384DF7-73D0-47E7-B59E-(E-Mail Removed)...
>> 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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Adding both a "click" url and a "view" url to a text link dgco Microsoft Frontpage 4 10th May 2009 09:26 PM
How to "turn-off" auto-increment between two text columns CapinMorgan@gmail.com Microsoft Access Forms 6 11th Oct 2006 10:28 PM
change text "a" to "b" with click in presentation mode =?Utf-8?B?cGF1bA==?= Microsoft Powerpoint 3 17th Feb 2006 09:01 PM
How to restore the "Insert Auto Text" menu in the "Header & Footer" tool bar???? Gilles Desjardins Microsoft Word New Users 3 16th May 2005 02:53 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:41 PM.