Method Range of Object _global Failed

josephmary

New Member
Joined
Oct 18, 2023
Messages
27
Office Version
  1. 365
Platform
  1. 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
 

Attachments

  • rangeerror.JPG
    rangeerror.JPG
    52.8 KB · Views: 33
  • globalerror.JPG
    globalerror.JPG
    17.9 KB · Views: 30

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Code:
FormRange = "V2" & LastRow

should be:

Code:
FormRange = "V" & LastRow
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,244
Members
452,622
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top