January 30, 2020
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
Power Query
Power Pivot
Xtreme Pivot Tables
Excel for Decision Making
Excel for Finance
Excel Analysis Toolpak
Power BI
Excel
Word
Outlook
Excel Expert
Excel Customer Service
PowerPoint
November 8, 2013
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.
1 Guest(s)