How to suppress a message box from popping up during a macro
Hi Norbert,
Am Tue, 6 Apr 2021 03:10:32 -0700 (PDT) schrieb Norbert:
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
try:
Range("F13").TextToColumns Destination:=Range("I13"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, Other:=True, OtherChar:="+", _
FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), _
TrailingMinusNumbers:=True
Regards
Claus B.
--
Windows10
Microsoft 365 for business
|