Mar 12 2021 06:31 AM - edited Mar 12 2021 06:42 AM
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...
Mar 12 2021 06:41 AM
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
Mar 12 2021 06:50 AM
Mar 31 2021 02:50 AM - edited Mar 31 2021 03:19 AM
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.
Mar 31 2021 03:21 AM
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.
Mar 31 2021 03:54 AM
In the attached version, you will see a new button in the Quick Access Toolbar. This button runs a macro that displays the userform.
Mar 31 2021 05:18 AM
Apr 24 2021 10:43 AM - edited Apr 24 2021 11:05 AM
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.
Apr 24 2021 11:10 AM
See the attached version.
Apr 24 2021 11:17 AM
It works! Thank you so much sir:smiling_face_with_smiling_eyes::smiling_face_with_smiling_eyes: