Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Prevent Users from switching worksheet

Here is my goal. I have a form which is non modal so that users can
select cells from a chosen worksheet. Users should only be able to
chose cells from that worksheet. Therefore I want to take away the
ability to change worksheets while that form is displayed.

What I have tried.
I figured maybe I could disable the tabs...
Application.CommandBars("Workbook tabs").Enabled = false

But this seems to have no affect on anything. So I resorted to hiding
all of the other worksheets during the form, and redisplaying them
after.

Is there another way? Should I be able to disable the tabs?

Thanks. Please also kindly respond to my private email if you can.

-Ew
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default Prevent Users from switching worksheet

The following code will hide the worksheet tabs from the user. I do not know if this is sufficient to solve your proble

ActiveWindow.DisplayWorkbookTabs = False
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Prevent Users from switching worksheet

Hello Elie

Maybe this is what you need. Right-click on the required sheet, choose
"view code " and then copy and paste the code below. You will need to
change Sheet1 with the name of your sheet and UserForm1 with the name of
your userform. What it does it to re-activate your sheet whenever it is
deactivated while your userform is loaded. Take note that the userform must
be "unloaded" in order for the user to select other sheet.

Private Sub Worksheet_Deactivate()
For Each frm In UserForms
If frm.Name = "UserForm1" Then
ActiveWorkbook.Sheets("Sheet1").Activate
Next frm
End Sub

Hope this help.

Jon-jon

"Elie" wrote in message
om...
Here is my goal. I have a form which is non modal so that users can
select cells from a chosen worksheet. Users should only be able to
chose cells from that worksheet. Therefore I want to take away the
ability to change worksheets while that form is displayed.

What I have tried.
I figured maybe I could disable the tabs...
Application.CommandBars("Workbook tabs").Enabled = false

But this seems to have no affect on anything. So I resorted to hiding
all of the other worksheets during the form, and redisplaying them
after.

Is there another way? Should I be able to disable the tabs?

Thanks. Please also kindly respond to my private email if you can.

-Ew



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Prevent Users from switching worksheet

ActiveWindow.DisplayWorkbookTabs = False

John M. Thanks. It does just what I want. Hides the tabs. Why do you
think it may not be sufficient.

-Elie
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 62
Default Prevent Users from switching worksheet

Hello Elie,

Any average user know that you can switch between sheets by ctrl+pageup and
ctrl+pagedown. Have you red my reply to your post?

Regards,

"Elie" wrote in message
om...
ActiveWindow.DisplayWorkbookTabs = False


John M. Thanks. It does just what I want. Hides the tabs. Why do you
think it may not be sufficient.

-Elie





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Prevent Users from switching worksheet

Jon Jon,

Thanks. I did see your reply. I am advanced in some parts of excel but
still rather novice in many things. This is my first major excel
project so please bare with me.

I think that your first solution will work for me (well, similar
anyway because I didn't describe my requirements that accurately).

Thanks,
Elie.

"JON JON" wrote in message ...
Hello Elie,

Any average user know that you can switch between sheets by ctrl+pageup and
ctrl+pagedown. Have you red my reply to your post?

Regards,

"Elie" wrote in message
om...
ActiveWindow.DisplayWorkbookTabs = False


John M. Thanks. It does just what I want. Hides the tabs. Why do you
think it may not be sufficient.

-Elie

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
Prevent wandering users cindee Excel Discussion (Misc queries) 2 October 5th 05 08:20 PM
How do I prevent users to delete a worksheet, but allow to edit? [email protected] Excel Discussion (Misc queries) 2 September 1st 05 08:37 PM
prevent users from overwriting other users data [email protected] Excel Worksheet Functions 0 April 17th 05 08:18 PM
MACRO OR VBA CODE TO PREVENT USERS FROM PRINTING THE CONTENTS OF A WORKSHEET? Marcello do Guzman Excel Programming 1 November 8th 03 12:34 AM
Prevent users from using AutoFilter Rob Savage Excel Programming 1 October 27th 03 11:42 AM


All times are GMT +1. The time now is 01:27 AM.

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"