I made this macro that will take a string of text (ex: Test.12048.210384.193287) from a scanned QR code in cell A2 and will perform a text to column function on the string to separate by a period delimiter "." to put "Test" in cell A2, 12048 in cell B2, so on and so forth with the text string. The code works and involves more code to prevent a data override message for each row but when it finishes I receive a 400 error. Is something in my code causing this?
I also have a macro that clears all even rows so row A2, A4, A6, etc. This also gives me a 400 error when it is finished but it functions perfectly fine. Any idea why?
VBA Code:
Sub DisableAlerts()
Application.DisplayAlerts = False
Dim row_num As Long
For i = 2 To 100 Step 2
Range("A" & i).TextToColumns Destination:=Range("A" & i), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False, Tab:=False, _
Semicolon:=False, Comma:=False, Space:=False, Other:=True, OtherChar _
:=".", FieldInfo:=Array(1, 1), TrailingMinusNumbers:=True
Next i
Application.DisplayAlerts = True
End Sub
I also have a macro that clears all even rows so row A2, A4, A6, etc. This also gives me a 400 error when it is finished but it functions perfectly fine. Any idea why?
VBA Code:
Sub cleareven()
For i = 2 To ActiveSheet.UsedRange.Rows.Count Step 2
Rows(i).ClearContents
Next i
End Sub