How to Use Combobox to Choose and Activate Sheets with VBA (Automatic Update)

preview_player
Показать описание
In this video you can learn on how to use combo box to choose and activate certain sheet in your workbook, the combo box will also dynamically change whenever you add new worksheet.
Рекомендации по теме
Комментарии
Автор

Hi, just want to ask what if I want a selected sheets to show in the combo box, what is the code of that?

renatorodriguezjr
Автор

Hi
Vey Nicely Explained.


Used your Code in my office template. However, minor change is required which I am unable to achieve though.


Can you modify your code a bit please.



By default on opening of this file, only sheet "No.1" will be visible and rest all other sheets will be hidden, and "Select a sheet" will appear in Combo Box.



Now depending upon selection in Combo Box, i.e. No.1:No.2:No.3:No.4, only respective Sheet will be unhidden first and made active (Assume No.2 is selected in Combo Box List which should make Sheet "No.2" be unhidden first and appear along with sheet "No.1" and Sheet "No.2" will be the active Sheet for user to carry out Data entry).



Once Data entry is done in Sheet "NO.2" and when user either selects sheet "No.1" or Closes the Workbook, Sheet "No.2" will again get hidden and "Select a Sheet" will appear in Combo Box in Sheet "No.1" for user to select another sheet and Cycle of operation continues. So, in other words, after selection in Combo Box only two Sheets will appear in any case. one "No.1" and other selected from Combo Box.




The Sheet "No.1t" is locked except for Combo Box.


All Data Entry in any sheet selected through Combo Box shall be automatically Saved.


Also, can we omit No.1 from appearing in the Combo Box List. i.e. Instead of Starting from No.1, can we create a List starting from No.2 sheet and yet dynamic.



Hope to have your reply.


Thanks in advance.

HiteshPatel-hqlt