Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi, When my user open the XLS file, i would like to be sure that all sheets are hidden and that a particular form is displayed. this form should be somehow modal to be sure that user can not click on Excel application menu or somewhere else. how can i do that ? thx. A. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() first off you'll need at least one visible sheet next, make all the other sheets xlhidden or xlveryhidden Sub HideSheets() dim ws as worksheet for each ws in worksheets if ws.name < "Sheet1" then ws.Visible = xlveryhidden end if next End Sub show the userform from the workbook's open event to do this, go to the development environment (ALT+F11), then in the project view right click on ThisWorkbook and select View Code In the code sheet, select Workbook from the object dropdown - you'll see <General by default - and you'llprobably get the Open methods SUB/END SUB stubs entered by default add the show userform code as per this example: Private Sub Workbook_Open() UserForm1.Show End Sub "Alain R." wrote in message ... Hi, When my user open the XLS file, i would like to be sure that all sheets are hidden and that a particular form is displayed. this form should be somehow modal to be sure that user can not click on Excel application menu or somewhere else. how can i do that ? thx. A. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User Form - use of single form for multiple sheets | Excel Programming | |||
Hide/Unhide Sheets Form | Excel Programming | |||
Hide all sheets but selected sheets - an example | Excel Programming | |||
How do I hide the form? | Excel Programming | |||
Show Form, Hide all Sheets | Excel Programming |