Making macros work in Excel 97

Greg Determann

New Member
Joined
Jan 18, 2005
Messages
20
This works in Excel 2000, but when a coworker tries to use some checkboxes that I set up, it gives her this:

Run-time error '1004'
Unable to set the HIdden property of the Range class


The code I have is this:

Private Sub CheckBox10_Click()
If CheckBox10.Value = True Then
Sheets("Projections").Range("A25").EntireRow.Hidden = False
Else
Sheets("Projections").Range("A25").EntireRow.Hidden = True
End If
End Sub

Any ideas why this isn't working and how to make it work. I know it is absolutely RIDICULOUS that she has Excel 97, but nothing we can do about it right now. Thanks in advance.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
Is the worksheet protected? That would cause that error, so maybe:
Code:
Private Sub CheckBox10_Click()
    If CheckBox10.Value = True Then
        With Sheets("Projections")
            .Unprotect
            .Range("A25").EntireRow.Hidden = False
            .Protect
        End With
    Else
        With Sheets("Projections")
            .Unprotect
            .Range("A25").EntireRow.Hidden = True
            .Protect
        End With
    End If
End Sub

HTH,

Smitty
 
Upvote 0

Forum statistics

Threads
1,203,079
Messages
6,053,408
Members
444,662
Latest member
AaronPMH

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