VBA error 91 object variable or with block variable not set - With ActiveWindow

Huhenyo

Board Regular
Joined
Jun 11, 2008
Messages
138
I have had 60+ users using the following code without any problems, but I have one user who gets the run-time error 91 with the following code (using the same version of Excel) which pulls up a form that just gives the user information and they can click a box to tell it not to pop up again and click ok.

Code:
Private Sub Workbook_Open()
    If GetSetting("RRIP_Settings", "Workbook_Settings", "Hide_frmNoWarranty") <> "True" Then
        frmNoWarranty.Show False
    ElseIf GetSetting("RRIP_Settings", "Workbook_Settings", "Hide_Getting_Started") <> "True" Then
        frmGettingStarted.Show False
    End If
    Application.DisplayFormulaBar = False
    With ActiveWindow
        .DisplayHeadings = False
        .DisplayGridlines = False
    End With
    ActiveSheet.Protect
End Sub

Does anyone have an idea why she would get this error, but no one else seems to have problems?

Thank you!
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
Norie, thanks for trying to help. We ended up being able to resolve the issue. I had change a macro name that was assigned to the object and no one else had clicked on it since I made that change so everyone else would have had the same error, but no one reported it because no one had clicked on that rarely used button/object.
 
Upvote 0

Forum statistics

Threads
1,214,560
Messages
6,120,217
Members
448,951
Latest member
jennlynn

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