Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 105
Default Very EASY & SIMPLE VBA~!!! HELP msgbox

Hi all,

I tried to do "Text to Columns" with VBA and it works fine except
while it is executing it, msg box comes up and says " Replace
destination Cells? with Ok and Cancel button". Obviously if I press
"OK" I get the result I want. However How do I make it ignore the msg
box and execute it or how do I set "OK" without msg box popping up?



Selection.TextToColumns Destination:=Range("C1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 2), Array(2, 2)),
TrailingMinusNumbers:=True


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Very EASY & SIMPLE VBA~!!! HELP msgbox


Following turns off the message. Insert it at the beginning of the code:-
Application.DisplayAlerts = False

Following turns them back on again. Ensure that you do insert this at the
end of the code:-
Application.DisplayAlerts = True

--

Regards,

OssieMac


"James8309" wrote:

Hi all,

I tried to do "Text to Columns" with VBA and it works fine except
while it is executing it, msg box comes up and says " Replace
destination Cells? with Ok and Cancel button". Obviously if I press
"OK" I get the result I want. However How do I make it ignore the msg
box and execute it or how do I set "OK" without msg box popping up?



Selection.TextToColumns Destination:=Range("C1"),
DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True,
OtherChar _
:="-", FieldInfo:=Array(Array(1, 2), Array(2, 2)),
TrailingMinusNumbers:=True



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
popup msgbox ok continue simple code anduare2 Excel Programming 2 April 16th 08 03:42 PM
help to count by macro or whatever simple and easy.... driller Excel Discussion (Misc queries) 0 July 11th 07 03:58 PM
how to formulate this simple n easy? driller Excel Worksheet Functions 0 May 9th 07 10:09 PM
Simple MsgBox question Gig[_2_] Excel Programming 2 July 15th 06 03:55 PM
Simple Msgbox needed johncassell[_40_] Excel Programming 2 February 24th 06 05:57 PM


All times are GMT +1. The time now is 09:50 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"