Forum

Tempory Sheet View/...
 
Notifications
Clear all

Tempory Sheet View/Combo box with names go into tempory view

2 Posts
2 Users
0 Reactions
219 Views
(@stevenbehr1)
Posts: 92
Estimable Member
Topic starter
 

Hi,

I just realised about the the feature Tempory Sheet View and inputting various peoples names to access the one workbook in onedrive in tempory view.

What I am wondering about is how to create a combox to select names to go into tempory view.

I have added the following code:

Sub ViewOptionSheet2()
'
' ViewOptionSheet2 Macro

Sheets("Sheet1").Select
ActiveSheet.NamedSheetViews.GetItem("Kerrie").Activate
Sheets("Sheet2").Select
ActiveSheet.NamedSheetViews.GetItem("Kerrie").Activate
Sheets("Sheet1").Select
ActiveSheet.NamedSheetViews.Exit
End Sub

Sheet2 has the names and a naming convension "YourName". When you select the relevant name, what-ever the name is selected it will be go into tempory view but also in sheet 2 column B has the password so that no one can access other peoples workspace at same time.

I have added the file in but you need to save this into onedrive for this tempory view to activate

 

Thanks

 

Steve

 
Posted : 22/06/2021 1:48 am
(@catalinb)
Posts: 1937
Member Admin
 

Hi Stephen,

Macros will not work in a browser, when users are accessing that file in Excel Online.

Sheet views are available to all users, so even if you set a password, they will still be able to select the named view from Sheet Views dropdown.

If you want to restrict the view to combobox selected user, it does not really make sense, as anyone can select anything from the combo.

I guess you want to force users to use a specific view, so you intend to use passwords. Initially, you might display a specific view this way, but they can manually change the sheet view from menu and you have no way to prevent that.

You could check the view name with ActiveSheet.NamedSheetViews.getactive.name and see if corresponds to the current user.

 
Posted : 26/06/2021 12:03 am
Share: