Forum Discussion
Excel
Mar 12, 2021Iron Contributor
Question related to hidden sheet in excel VBA
Hello Everyone, Suppose i have sheet. And i hide the ZAN sheet Like - When i run the code, then i select ZAN sheet in dropdown Like - Then it give me error. like - ...
HansVogelaar
Mar 12, 2021MVP
Change the UserForm_Initialize event procedure like this:
Private Sub UserForm_Initialize()
Dim wsh As Worksheet
For Each wsh In Worksheets
If wsh.Visible = xlSheetVisible Then
Me.cboWhichSheet.AddItem wsh.Name
End If
Next wsh
End Sub
Excel
Mar 31, 2021Iron Contributor
Hello Sir,
I have written this code to show userform.
Like -
If I close the form, Is there any code or adding a button so that it displays again? As the given code only gives us the option to display form when we open the workbook. Can you help me with adding a button or code to display user form instead of closing the whole workbook to get the it?
Please help...???
Here is the attached file.
- HansVogelaarMar 31, 2021MVP
In the attached version, you will see a new button in the Quick Access Toolbar. This button runs a macro that displays the userform.
- ExcelMar 31, 2021Iron ContributorWow! I do not know this function can works.
Thank you so much sir😊😊