Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Programming / May 2008

Tip: Looking for answers? Try searching our database.

Very EASY & SIMPLE VBA~!!! HELP msgbox

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James8309 - 28 May 2008 07:16 GMT
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
OssieMac - 28 May 2008 07:32 GMT
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

Signature

Regards,

OssieMac

> Hi all,
>
[quoted text clipped - 12 lines]
>         :="-", FieldInfo:=Array(Array(1, 2), Array(2, 2)),
> TrailingMinusNumbers:=True
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.