View Single Post
  #1   Report Post  
Old April 6th 21, 11:10 AM posted to microsoft.public.excel.programming
Norbert[_4_] Norbert[_4_] is offline
external usenet poster
First recorded activity by ExcelBanter: Aug 2012
Posts: 52
Default How to suppress a message box from popping up during a macro

Hi everybody!
When I run a certain macro I'm receiving the following message box from Excel which I have to always answer with "Ok":

"There's already data here. Do you want to replace it?"

It happens when I run a command to split a text to columns.
The text (in cell: F13) is e.g.: BLACK+NATURAL+STONE

The code looks like this:
' separating the names of single components into Colour 1, 2 and 3
Selection.TextToColumns Destination:=Range("I13"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:="+", FieldInfo:=Array(Array(1, 1), Array(2, 1)), TrailingMinusNumbers:=True

How can I suppress the message from popping up?