wizardofsloth
New Member
- Joined
- Mar 5, 2021
- Messages
- 2
- Office Version
- 365
- 2019
- Platform
- Windows
I'm having issues while importing and deleting data and unimportant cells into excel using ActiveCell. Small data imports work just fine, but large amounts of data gives me Method "Range" of object '_Global' failed
Below is the VBA code used. I would like to avoid ActiveCell, what would be the best way to go about doing this?
Below is the VBA code used. I would like to avoid ActiveCell, what would be the best way to go about doing this?
VBA Code:
IdxMsg1.TextBox1.Value = "Checking Data"
IdxMsg1.Repaint
Range("startImport").Offset(0, 2).Select
i = 0
j = 0
Do While i < intC
i = i + 1
work = ActiveCell.Value
check = IsNumeric(work)
If check = True Then
ActiveCell.Offset(1, 0).Select
Else
ActiveCell.EntireRow.Delete
j = j + 1
Range("StartImport").Offset(i - 2, 2).Select
End If
Loop
intC = intC - j
Range("TotalEntries").Value = intC
Range("StartImport", "EndImport").Select
Selection.Font.ColorIndex = 5
Selection.Interior.ColorIndex = 19