Excel VBA Run Time Error '438': Object doesn't support this property or method

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 "Do while wsControl (Row,40).Value <> Nullstring" line. I have tried to research but have not found anything that has helped. Another issue is the "Refresh Only" checkbox does not work and I an thinking about removing it from the report.

Any help would be greatly appreciated.

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

Code:
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
        
    If wsControl.OptionButtons("ALL") = xlOn Then
        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
    

[B]Do While wsControl(Row, 40).Value <> NullString[/B]
  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
 
Last edited by a moderator:

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
You forgot to use Cells.

Code:
[B]Do While wsControl.Cells(Row, 40).Value <> NullString[/B]
 
Upvote 0

Forum statistics

Threads
1,223,247
Messages
6,171,007
Members
452,374
Latest member
keccles

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