DATA > Text to Columns

  • Thread starter Thread starter DAA
  • Start date Start date
D

DAA

I wrote a macro to separate text using Data > Text to
columns.

When I run the macro, a message box appears with
"DO YOU WANT TO REPLACE THE CONTENTS OF THE DESTINATION
CELLS?"

The user must CLICK "OK" or "CANCEL".

Is there a macro command that would default to "OK" so the
message box will no longer appear?

Thanks.
 
try putting your code between Application.DisplayAlerts, like this
Application.DisplayAlerts = False
'Your Code
Application.DisplayAlerts = True
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **
 
Sub Macro()
Application.DisplayAlerts = False
'your code
Application.DisplayAlerts = True
End Sub


--
For everyone's benefit keep the discussion in the newsgroup.

Regards,

Peo Sjoblom
 
Worked perfectly! Thank you guys.
-----Original Message-----
try putting your code between Application.DisplayAlerts, like this
Application.DisplayAlerts = False
'Your Code
Application.DisplayAlerts = True
--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 97 & 2000
** remove news from my email address to reply by email **





.
 
Back
Top