Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
COM COM is offline
external usenet poster
 
Posts: 40
Default multi tab selection prohibition

I want to prevent users from selecting/highlighting multiple tabs (worksheets) in a workbook, though I want all worksheets to be visible, any ideas?

(This is a repost of yesterday, but didn't get a response that accomplished that desired above)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default multi tab selection prohibition

I don't think there is a way to prohibit the user from selecting
multiple sheets.

"COM" wrote in message
...
I want to prevent users from selecting/highlighting multiple

tabs (worksheets) in a workbook, though I want all worksheets to
be visible, any ideas?

(This is a repost of yesterday, but didn't get a response that

accomplished that desired above)


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default multi tab selection prohibition

See response to your original post. (for a possible workaround).

--
Regards,
Tom Ogilvy
"COM" wrote in message
...
I want to prevent users from selecting/highlighting multiple tabs

(worksheets) in a workbook, though I want all worksheets to be visible, any
ideas?

(This is a repost of yesterday, but didn't get a response that

accomplished that desired above)


  #4   Report Post  
Posted to microsoft.public.excel.programming
COM COM is offline
external usenet poster
 
Posts: 40
Default multi tab selection prohibition

May be the best solution possible, without going through and undoing each change that was then applied to all selected pages.

See my response on yesterday's thread.
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default multi tab selection prohibition

The only situation where this would fail is if the user selected multiple
sheets and then immediately made a change to the current activecell on the
activesheet - the event would not be triggered. You could couple this with
a check in the SheetChange event to check Activewindow.SelectedSheets.Count
1 then do an immediate

Application.Undo

Or just use that type of approach in SheetChange.

--
Regards,
Tom Ogilvy

"COM" wrote in message
...
May be the best solution possible, without going through and undoing each

change that was then applied to all selected pages.

See my response on yesterday's thread.





  #6   Report Post  
Posted to microsoft.public.excel.programming
COM COM is offline
external usenet poster
 
Posts: 40
Default multi tab selection prohibition

Came up with a fix... And it deals with all of the possible combinations that we have discussed.

Thank you for the suggestion of Application.Undo. I'm including my resulting code, if anyone would care to accomplish what we've done, and for the length of time that this message will remain on the site.

Of course this "fix" may tick off some users, but let me tell you it is for the better interest of the group than for the one individual that might think to select say all the sheets and potentially overwrite all good data, just to fix one possible mistake on a single sheet. Anyways, the following code works like a charm, thank you each and every one for the assistance. Plagiarize away. :)

Option Explicit

Private Sub Workbook_SheetActivate(ByVal Sh As Object)
If ActiveWindow.SelectedSheets.Count 1 Then
ActiveSheet.Select
End If
End Sub

Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Excel.Range)
Dim CellData As Variant
Dim CellLoc As Variant


If ActiveWindow.SelectedSheets.Count 1 Then
ActiveSheet.Select
CellLoc = Target.Address()
CellData = Target.Formula

Application.Undo
ActiveSheet.Range(CellLoc).Formula = CellData

End If

End Sub

Private Sub Workbook_SheetSelectionChange( _
ByVal Sh As Object, ByVal Target As Range)
If ActiveWindow.SelectedSheets.Count 1 Then
ActiveSheet.Select
End If
End Sub

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
Multi selection copy problem Farhad Excel Discussion (Misc queries) 2 January 25th 08 07:14 PM
multiple selection copy & paste across multi-worksheets aw Excel Discussion (Misc queries) 0 November 29th 07 06:20 AM
Multi Selection List/Combi Box Richard Excel Discussion (Misc queries) 7 November 7th 07 03:17 PM
Preventing Multi Cell Selection Michael Excel Dude Excel Discussion (Misc queries) 2 September 5th 06 02:18 PM
Multi-selection problem in Excel XP and 2003 Vicente Zambrano Excel Discussion (Misc queries) 0 February 10th 05 11:29 PM


All times are GMT +1. The time now is 09:56 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"