View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norbert[_4_] Norbert[_4_] is offline
external usenet poster
 
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:
Range("I13:K13").Select
ActiveSheet.Unprotect
Selection.ClearContents
Range("F13").Select
Selection.Copy
' 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?