W
wilro85
On a workbook I'm making, I'm trying to have a customizable interface
that will hide items as the user desires, however, I get an error
calling the program I want to run across sheets. Thing that bothers me
about this is I know both programs work if I run them independently. I
also know that programs can run across sheets. Where am I going wrong?
Private Sub CheckBox1_Click()
Application.ScreenUpdating = False
If CheckBox1 = True Then
Range("a18").Select
Selection.EntireRow.Hidden = False
CommandButton7.Visible = True
CALL SHEETS(\"OVERVIEW\").SPECIAL
Else
If Worksheets("overview").Range("b58").Value = 0 And
Worksheets("overview").Range("c58").Value = 0 Then
Range("a18").Select
Selection.EntireRow.Hidden = True
CommandButton7.Visible = False
CALL SHEETS(\"OVERVIEW\").SPECIAL
Else
Application.ScreenUpdating = True
MsgBox ("The object you have choosen to hide contains values and thus
can't be hidden.")
End If
End If
End Sub
*Other sheet*
Public Sub special()
If Sheets("summary").CheckBox1 = True Then
Range("a61").Select
Selection.EntireRow.Hidden = False
Else
Range("a61").Select
Selection.EntireRow.Hidden = True
End If
End Sub
*Edit - More info*
The specific error I get when I try to run the program is:
Runtime Error "1004"
Select method or Range class failed.
What does that mean?
that will hide items as the user desires, however, I get an error
calling the program I want to run across sheets. Thing that bothers me
about this is I know both programs work if I run them independently. I
also know that programs can run across sheets. Where am I going wrong?
Private Sub CheckBox1_Click()
Application.ScreenUpdating = False
If CheckBox1 = True Then
Range("a18").Select
Selection.EntireRow.Hidden = False
CommandButton7.Visible = True
CALL SHEETS(\"OVERVIEW\").SPECIAL
Else
If Worksheets("overview").Range("b58").Value = 0 And
Worksheets("overview").Range("c58").Value = 0 Then
Range("a18").Select
Selection.EntireRow.Hidden = True
CommandButton7.Visible = False
CALL SHEETS(\"OVERVIEW\").SPECIAL
Else
Application.ScreenUpdating = True
MsgBox ("The object you have choosen to hide contains values and thus
can't be hidden.")
End If
End If
End Sub
*Other sheet*
Public Sub special()
If Sheets("summary").CheckBox1 = True Then
Range("a61").Select
Selection.EntireRow.Hidden = False
Else
Range("a61").Select
Selection.EntireRow.Hidden = True
End If
End Sub
*Edit - More info*
The specific error I get when I try to run the program is:
Runtime Error "1004"
Select method or Range class failed.
What does that mean?