I have a sheet with a number of radio buttons. Depending upon which
one is clicked depends which sheet the rest of the code works on.
I want to be able to read a cell on this sheet which will determine
which sheet the rest of the code will work with.
I get a runtime error with:
Private Sub baseline(yr)
Sheets(yr).Activate
ActiveSheet.Columns("A:AE").Select 'first select everything
Selection.EntireColumn.Hidden = False 'then unhide the columns
ActiveSheet.Columns("l:aa").Select 'Hide unwanted columns
Selection.EntireColumn.Hidden = True
End Sub
The baseline sub I call as follows:
baseline("A4")
Where A4 contains the text 'Sheet 6', the same as the sheet name.
Can anyone help me out?