Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Replace destination cells

When, in my macro, the code gets to this line:

Columns("AA").TextToColumns Destination:=Range("AB1"),
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True,
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1),
Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1),
Array(8, 1), Array(9, 1)), TrailingMinusNumbers:=True

I am asked whether I want to replace the contents of the destination.
As I always want to do this, is there a way I can have this happen, and
avoid the user prompt?


Thanks in advance.

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,089
Default Replace destination cells

Try:

Application.DisplayAlerts = False
' your code
Application.DisplayAlerts = True

Regards

Trevor


"SmilingPolitely" wrote in message
. au...
When, in my macro, the code gets to this line:

Columns("AA").TextToColumns Destination:=Range("AB1"),
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True,
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1),
Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1),
Array(8, 1), Array(9, 1)), TrailingMinusNumbers:=True

I am asked whether I want to replace the contents of the destination.
As I always want to do this, is there a way I can have this happen, and
avoid the user prompt?


Thanks in advance.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Replace destination cells

Wrap the code with

Application.DisplayAlerts = False
'your code
Application.DisplayAlerts = True

HTH
Cheers
Nigel

"SmilingPolitely" wrote in message
. au...
When, in my macro, the code gets to this line:

Columns("AA").TextToColumns Destination:=Range("AB1"),
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True,
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1),
Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1),
Array(8, 1), Array(9, 1)), TrailingMinusNumbers:=True

I am asked whether I want to replace the contents of the destination.
As I always want to do this, is there a way I can have this happen, and
avoid the user prompt?


Thanks in advance.



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Replace destination cells

Sensational.. thanks

Nigel wrote:

Wrap the code with

Application.DisplayAlerts = False
'your code
Application.DisplayAlerts = True

HTH
Cheers
Nigel

"SmilingPolitely" wrote in message
. au...

When, in my macro, the code gets to this line:

Columns("AA").TextToColumns Destination:=Range("AB1"),
DataType:=xlDelimited, TextQualifier:=xlDoubleQuote,
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False, Comma:=True,
Space:=False, Other:=False, FieldInfo:=Array(Array(1, 1), Array(2, 1),
Array(3, 1), Array(4, 1), Array(5, 1), Array(6, 1), Array(7, 1),
Array(8, 1), Array(9, 1)), TrailingMinusNumbers:=True

I am asked whether I want to replace the contents of the destination.
As I always want to do this, is there a way I can have this happen, and
avoid the user prompt?


Thanks in advance.





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
"Do you want to replace the contents of the destination cells?" Bob Barnes Excel Discussion (Misc queries) 8 April 2nd 23 08:05 PM
Do you want to replace the destination cells? Martin ©¿©¬ @nohere.net Excel Discussion (Misc queries) 5 November 20th 09 05:43 AM
Copy Source Cells to Destination Cells Only when a Change Occurs excel student Excel Discussion (Misc queries) 2 July 13th 08 04:13 AM
copying cells with formulas, but to keep it alike in destination mike Excel Programming 4 February 23rd 04 02:15 PM
Multiple destination cells for data entry gregork Excel Programming 2 February 17th 04 04:53 AM


All times are GMT +1. The time now is 05:12 PM.

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"