Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Hi I am trying to write some code that when the workbook is opened, it prompts the user for a password and if an invalid password is entered it closes the workbook. This seems pretty simple. Putting the below snippet into the open event ... pass_dpanel.Show If (pass_dpanel.TextBox1.Value < "correct") Then ' not valid password MsgBox ("invalid password") ActiveWorkbook.Close End If Which works ok until I copy the workbook onto our web server. This time when an incrrect password is entered a duplicate file is opened myworkbook[1].xls and if an incorrecte passwrod is entered for a seccond time I get an "Invalid operation" error. Any ideas ? -- jmoffat ------------------------------------------------------------------------ jmoffat's Profile: http://www.excelforum.com/member.php...fo&userid=1151 View this thread: http://www.excelforum.com/showthread...hreadid=535477 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Closing Hidden Workbook when Active Workbook is Closed | Excel Programming | |||
Closing a workbook and printing a non-active page | Excel Programming | |||
closing active windows without saving changes | Excel Programming | |||
Need help for closing the active worksheet only under conditions | Excel Programming | |||
closing excel after closing a workbook | Excel Programming |