Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Hide sheets and allow form


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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,049
Default Hide sheets and allow form


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User Form - use of single form for multiple sheets Roger on Excel Excel Programming 3 September 19th 08 03:01 AM
Hide/Unhide Sheets Form dbarelli[_18_] Excel Programming 3 August 1st 06 03:09 PM
Hide all sheets but selected sheets - an example [email protected] Excel Programming 1 April 7th 06 06:29 PM
How do I hide the form? Andy Dorph Excel Programming 2 March 1st 06 06:55 PM
Show Form, Hide all Sheets John Pierce Excel Programming 2 June 10th 04 10:42 AM


All times are GMT +1. The time now is 09:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"