All of a sudden error 438 Object not supported

klarowe

Active Member
Joined
Mar 28, 2011
Messages
389
We have been running these inspection reports that you guys helped me create for almost 2 years now without any major issues. Now all of a sudden I am getting an Error 438 whenever I open up the report. Here is the code that is causing the error. It is being caused on the very first line.

Code:
Private Sub Workbook_Open()    
    Sheets("Home").ReportCopyButton.Value = False
    Sheets("Home").InputModeButton.Value = True
    
    DisableEvents
    DisableScreen
    
    For Each ws In Sheets
        If ws.Visible Then ws.DisplayAutomaticPageBreaks = True
    Next ws
    
    EnableScreen
    EnableEvents


    On Error Resume Next
    If ActiveWorkbook.ReadOnly = True Then HomeData.Show
    If ActiveWorkbook.ReadOnly = True Then HomeDataSCF.Show
    If ActiveWorkbook.ReadOnly = True Then HomeDataEXP.Show
End Sub

And here is what happens when ReportCopyButton.Value is made false (just in case the underlining code is causing it to error out)

Code:
Private Sub ReportCopyButton_Click() 'Internal / Customer Copy    
    If ReportCopyButton.Value = True Then
        ReportCopyButton.Caption = "Customer Copy"
        Application.Run "Hide"
    End If
    If ReportCopyButton.Value = False Then
        ReportCopyButton.Caption = "Internal Copy"
        Application.Run "Unhide"
    End If
End Sub

And just for reference, here is the "hide" code.

Code:
Sub Hide() 'If specific sheet is visible, then hide the specific named range within that sheet.
    On Error Resume Next
    If Sheets("1st Stg Pinion").Visible Then Range("Pinion1").EntireRow.Hidden = True
    If Sheets("1st Stg Impeller").Visible Then Range("Impeller1").EntireRow.Hidden = True
    If Sheets("1st Stg Laby").Visible Then Range("Laby1").EntireRow.Hidden = True
    If Sheets("1st Stg Laby").Visible Then Range("Laby1T").EntireRow.Hidden = True
    If Sheets("1st Stg Tiebolt_Nut").Visible Then Range("Tiebolt1").EntireRow.Hidden = True
    If Sheets("2nd Stg Pinion").Visible Then Range("Pinion2").EntireRow.Hidden = True
    If Sheets("2nd Stg Impeller").Visible Then Range("Impeller2").EntireRow.Hidden = True
    If Sheets("2nd Stg Laby").Visible Then Range("Laby2").EntireRow.Hidden = True
    If Sheets("2nd Stg Laby").Visible Then Range("Laby2T").EntireRow.Hidden = True
    If Sheets("2nd Stg Tiebolt_Nut").Visible Then Range("Tiebolt2").EntireRow.Hidden = True
    If Sheets("3rd Stg Pinion").Visible Then Range("Pinion3").EntireRow.Hidden = True
    If Sheets("3rd Stg Impeller").Visible Then Range("Impeller3").EntireRow.Hidden = True
    If Sheets("3rd Stg Laby").Visible Then Range("Laby3").EntireRow.Hidden = True
    If Sheets("3rd Stg Laby").Visible Then Range("Laby3T").EntireRow.Hidden = True
    If Sheets("3rd Stg Tiebolt_Nut").Visible Then Range("Tiebolt3").EntireRow.Hidden = True
    If Sheets("1st Stg JNL Bearing").Visible Then Range("JnlBrg1").EntireRow.Hidden = True
    If Sheets("1st Stg THR Bearing").Visible Then Range("ThrBrg1").EntireRow.Hidden = True
    If Sheets("2nd Stg JNL Bearing").Visible Then Range("JnlBrg2").EntireRow.Hidden = True
    If Sheets("2nd Stg THR Bearing").Visible Then Range("ThrBrg2").EntireRow.Hidden = True
    If Sheets("3rd Stg JNL Bearing").Visible Then Range("JnlBrg3").EntireRow.Hidden = True
    If Sheets("3rd Stg THR Bearing").Visible Then Range("ThrBrg3").EntireRow.Hidden = True
    If Sheets("Drive Gear").Visible Then Range("DriveGear").EntireRow.Hidden = True
    If Sheets("Gearbox").Visible Then Range("Gearbox").EntireRow.Hidden = True
    If Sheets("Housings").Visible Then Range("Housings").EntireRow.Hidden = True


End Sub


We are running excel 2010. I don't know if maybe there was a recent update or something.... Thanks in advance for the help!
 
Last edited:

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Can you click the button manually?
 
Upvote 0
Well this seems to be deeper than I originally thought. I have a number of other workbooks that use various form control buttons and none of them work. It seems as if something has gone haywire after the latest automatic update (I remember my computer updating when I shut down last night). I really hope this is just temporary... I really don't feel like having to rewrite 3498739458734957834 macros again... lol.
 
Upvote 0

Forum statistics

Threads
1,212,934
Messages
6,110,760
Members
448,295
Latest member
Uzair Tahir Khan

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