"Run-Time error'3' Return without GoSub"
Above is the error code that I am presented with when I attempt to run my program in excel.
Sub Button3_Click()
If Range("G1").Value = "hot" Then
Call hotjuly17_macro
ElseIf Range("G1").Value = "cold" Then
Call coldjuly17_macro
Else
Return
End If
End Sub
I choose the Debug option and am presented with "Return" highlighted as the error. What I am trying to do is add another checkbox that hides/unhides the rows I've selected in excel. I've already got it working with one checkbox on this spreadsheet, but this second checkbox is not working for some reason. The code is almost identical with the exception of what rows get hidden/unhidden and where values are placed. (for example, values hot and cold are in G1 for this checkbox that I'm trying to fix, but for the working checkbox the values are in E1. Just thought I'd mention that)
I don't understand what the problem could be, I will be happy to post any code should anyone need to see it.
Aucun commentaire:
Enregistrer un commentaire