josephmary
New Member
- Joined
- Oct 18, 2023
- Messages
- 27
- Office Version
- 365
- Platform
- Windows
My macro has been working well the past month. In fact, it was working yesterday. Today, i encountered an error: Method Range of Object _global Failed. I don't know what went wrong when I haven't made any changes on this part (see attached screenshot). My macro is as follows.
Sub sectionname_drag()
'Extend Formula
Sheets("WB").Select
ThisWorkbook.RefreshAll
'Clear Formula
'Determine Last Row
With ActiveSheet
LastRow = .Cells(.Rows.Count, "U").End(xlUp).Row + 1
End With
FormRange = "V2" & LastRow
Range(FormRange).Select
Range(FormRange).ClearContents
'Drag Formula
With ActiveSheet
SkillDrag = .Cells(.Rows.Count, "U").End(xlUp).Row
End With
checker = "V" & SkillDrag
SkillDrag = "V" & SkillDrag
'checks if any raw data were added
If Range(checker).Value = "" Then
Range(SkillDrag).Select
Range(Selection, Selection.End(xlUp)).Select
Selection.FillDown
End If
Sheets("WB").Select
ThisWorkbook.RefreshAll
Call dragformula
End Sub