pg1533
asked on
ThisWorkbook.Windows(1).Visible = False
Hi,
I have a form named 'LoginFrm' in the workbook named 'Forecast.xlsm'. I have written the below code in workbook_open() event.
This will disable the user to access the worksheets which are there in this workbook. However, if there are already workbooks open (i am referring to other workbooks) then when I open this workbook (Forecast.xlsm) then this code will disable the user in accessing other opened workbooks also. Ideally, the user should be able to access other workbooks other than 'Forecast.xlsm'. Please advise.
Thank you,
Prashanth
I have a form named 'LoginFrm' in the workbook named 'Forecast.xlsm'. I have written the below code in workbook_open() event.
Private Sub Workbook_Open()
ThisWorkbook.Windows(1).Visible = False
LoginFrm.Show
End Sub
This will disable the user to access the worksheets which are there in this workbook. However, if there are already workbooks open (i am referring to other workbooks) then when I open this workbook (Forecast.xlsm) then this code will disable the user in accessing other opened workbooks also. Ideally, the user should be able to access other workbooks other than 'Forecast.xlsm'. Please advise.
Thank you,
Prashanth
Instead of making the windows not visible why not set all tabs to xlVeryHidden and then once the user has logged on then loop through and make them visible. You would also add a before save script to hide them before the workbook is saved.
Michael
Michael
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you
EE's sister site online-tech-tips has a registry patch for creating multiple instances in this article:
http://www.online-tech-tips.com/ms-office-tips/how-to-open-a-new-instance-of-excel-2007-workbooks/
Or there is discussion in a recent question here:
https://www.experts-exchange.com/questions/28070937/Open-up-individual-Excel-windows.html