Excel VBA Run Time Error '424': Object required

daves120

New Member
Joined
Apr 22, 2015
Messages
17
Hey folks,

I have been trying to create a macro that will either create a single workbook, or loop through a list a create a workbook for each name in the list. The range is called "Physical Site" and is really a European country in this case.

It will create a single workbook. The issue occurs when the macro gets to the Option Buttons ("ALL") line. I have tried to research but cannot figure out the issue. Any help would be greatly appreciated.

By the way, this macro sequence was taken from another workbook and trying to adapt to this report.


Sub WesternEuropeReport()


Dim Row As Integer
Row = 7


If wsControl.CheckBoxes("ScreenUpdate") = xlOn Then
Application.ScreenUpdating = True
Else
Application.ScreenUpdating = False
End If


If wsControl.OptionButtons("ONE") = xlOn Then
Call FilterPivot1
Call FilterPivotPS1v2
Call FilterFTEPivot
Call RefreshAllPivots
Call DeleteFTEs
Call CopyFTEs
Call BackToControl

End If

If wsControl.CheckBoxes("RefreshOnly") = xlOn Then
wsControl.Activate
Range("A1").Select

Exit Sub
Else
Call CreateNewReport
Call DeleteSheets
End If

Code:
[B]    If wsContol.OptionButtons("ALL") = xlOn Then [/B]"Run Time Error '424': Object required"
wsControl.Activate
Range("AN7").Select
End If

If wsControl.CheckBoxes("RefreshOnly") = xlOn Then
MsgBox "All Physical Sites in not an option when Refresh Only is selected"

End If


'wsControl.Range("gRef") = 1

Do While wsControl(Row, 40).Value <> NullString
Range("PhysicalSite") = Cells(Row, 40)
Call FilterPivot1
Call FilterPivotPS1v2
Call FilterFTEPivot
Call RefreshAllPivots
Call DeleteFTEs
Call CopyFTEs
Call CreateNewReport
Call DeleteSheets

Row = Row + 1
Loop


End Sub
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
Wow, can't believe I overlooked that one (but I did). Thanks for the quick reply. Have a new issue and will create a new thread for it.
 
Upvote 0

Forum statistics

Threads
1,215,219
Messages
6,123,691
Members
449,117
Latest member
Aaagu

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