bkexcel11230
New Member
- Joined
- Mar 26, 2023
- Messages
- 2
- Office Version
- 365
- Platform
- Windows
Hi all,
I am looking to reference a VBA code to another workbook. On the main sheet I have a checkbox that hide and unhide an excel spreadsheet. If you want to hide the spreadsheet you can click the checkbox. I am looking to hide and unhide specific sheets on both workbooks through the use of one checkbox. Unfortunately, I am running into issues and could use some help.
Private Sub CheckBox1_Click()
On Error Resume Next
ThisWorkbook.Sheets("sheet1").Visible = CheckBox1.Value
Workbooks("Job Briefing.xlsm').Sheets("sheet1").Visible = CheckBox1.Value
End Sub
I am looking to reference a VBA code to another workbook. On the main sheet I have a checkbox that hide and unhide an excel spreadsheet. If you want to hide the spreadsheet you can click the checkbox. I am looking to hide and unhide specific sheets on both workbooks through the use of one checkbox. Unfortunately, I am running into issues and could use some help.
Private Sub CheckBox1_Click()
On Error Resume Next
ThisWorkbook.Sheets("sheet1").Visible = CheckBox1.Value
Workbooks("Job Briefing.xlsm').Sheets("sheet1").Visible = CheckBox1.Value
End Sub