My issue:
I have a Macro, which sets my worksheet up to convert text into columns automatically, whenever I activate the sheet...
However when I have pasted the data, and move back and forth between the sheets, it will say “There’s already data here. Do you want to replace it?”
The macro on the sheet:
Private Sub Worksheet_Activate()
Dim sht As Worksheet
Dim LastRow As Long
Set sht = Sheets("Kvik kontoudtog")
LastRow = sht.Cells(sht.Rows.Count, "A").End(xlUp).Row
rng1 = "A1:A" & LastRow
sht.Range(rng1).TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=True, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=True, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5, 1))
End Sub
Goal:
I would like the macro to auto “Cancel” the alert, so that I don't have to
Question:
Can I insert a string to automatically click cancel, so it won’t ruin my data, and get rid of the alert by VBA?