View Single Post
  #6   Report Post  
Old April 6th 21, 01:33 PM posted to microsoft.public.excel.programming
Claus Busch Claus Busch is offline
external usenet poster
First recorded activity by ExcelBanter: Apr 2011
Posts: 3,872
Default How to suppress a message box from popping up during a macro

Hi Norbert,

Am Tue, 6 Apr 2021 05:05:59 -0700 (PDT) schrieb Norbert:

now it works, the only thing I realised is that it clears also the formats of range I13:K13 and when I changed your
code to:
.Range("I13:K13").ClearContents (instead of: .Range("I13:K13").Clear)

it comes up with the same message box as before. It would be nice if I could keep my formatting but if it is not
possible, I can also live with what it looks now.

try it this way:

With ActiveSheet
Application.DisplayAlerts = False
.Range("F13").TextToColumns Destination:=.Range("I13"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, Other:=True, OtherChar:="+", _
FieldInfo:=Array(Array(1, 1), Array(2, 1), Array(3, 1)), _
Application.DisplayAlerts = True
End With

Claus B.
Microsoft 365 for business