Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Finding the number of a worksheet

I am writing an menu driven application in which I want the user to only be
able to see one worksheet at a time. Each worksheet will have a unique
associated window with unique size and positioning.

Dim wrksht as worksheet



My goal is to have a sub of the form


sub UnhideSheetAndItsAssociatedWindow (sheet_)

ActiveWorkbook.Unprotect Password:="mypassword"

sheet_.visible = true

' all other sheets made invisible
' unhide window associated with sheet_
' hide all other windows

ActiveWorkbook.Protect Structu=True, Windows:=True, _
password:="mypassword"



end sub


My questions are

1) is it possible to define an object of type window
2) if so, how might one associate a desired window with a desired worksheet
3) How might one code the sub so that if it is passed a parameter which is a
worksheet, it will unhide this sheet and hide all other sheets, and it will
unhide the associated window and hide all other windows ?

-regards
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 95
Default Finding the number of a worksheet

George,

number of questions in the question.
To hide all worksheets, work with

For all MyWorksheet in Thisworkbook.sheets
if MyWorkSheet < sheet_ then myworksheet.hide 'hides all sheets but
your sheet_
next

Not sure why you want all sheets to have their own window? is it not simpler
to define the size and position of each sheet and resize and relocate the
window based on the sheet that is open?
Size of window can be addressed through
Application.Windows(1).Height
Application.Windows(1).Width
Application.Windows(1).Top
Application.Windows(1).Left

Good luck.
RDWJ
"GeorgeJ" wrote:

I am writing an menu driven application in which I want the user to only be
able to see one worksheet at a time. Each worksheet will have a unique
associated window with unique size and positioning.

Dim wrksht as worksheet



My goal is to have a sub of the form


sub UnhideSheetAndItsAssociatedWindow (sheet_)

ActiveWorkbook.Unprotect Password:="mypassword"

sheet_.visible = true

' all other sheets made invisible
' unhide window associated with sheet_
' hide all other windows

ActiveWorkbook.Protect Structu=True, Windows:=True, _
password:="mypassword"



end sub


My questions are

1) is it possible to define an object of type window
2) if so, how might one associate a desired window with a desired worksheet
3) How might one code the sub so that if it is passed a parameter which is a
worksheet, it will unhide this sheet and hide all other sheets, and it will
unhide the associated window and hide all other windows ?

-regards

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 40
Default Finding the number of a worksheet

RD, that is *extremely* helpful. Based on what you made me aware of, I'm
only going to use one window, which will make my app simpler. BTW, as you
probably know, I can size the window in Excekl then find out its dimensions &
location with statements such as

Msgbox Application.Windows(1).Top
--
-regards

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
Finding number less than 1 Sony Excel Discussion (Misc queries) 2 October 27th 06 01:19 AM
finding a number and the number of times it occurs luposlipophobia Excel Discussion (Misc queries) 3 June 22nd 06 03:51 AM
finding a particular cell in another worksheet whose row number ch Andrew Excel Discussion (Misc queries) 1 September 12th 05 01:36 PM
finding the right number kevindict Excel Worksheet Functions 2 September 7th 05 11:27 PM
finding row number? james Excel Discussion (Misc queries) 3 February 2nd 05 11:56 PM


All times are GMT +1. The time now is 03:08 PM.

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

About Us

"It's about Microsoft Excel"