Forum Discussion
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 -
I click in DEBUG button, then it is highlight in this -
So what will write in code that when i hide the sheet then it will not show in Dropdown in userform.
Here is a giving attach file.
Please help...
9 Replies
- ExcelIron Contributor
Hello Sir,
I have a two questions -
>> 1st question - When i click in CANCEL two times, then it shows error message.
Like -
when i click in DEBUG button, then it will yellow line highlighted -
so ,what will i write in code, when i click in CANCEL so userform remove?
2nd question - How to add below code in UserForm_Initialize -
Please help...???
Here is the attached file.
- ExcelIron Contributor
It works! Thank you so much sir😊😊
- ExcelIron Contributor
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.
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
- ExcelIron 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.
In the attached version, you will see a new button in the Quick Access Toolbar. This button runs a macro that displays the userform.
- ExcelIron ContributorHello Sir,
Thank you so much sir😊😊