password for workbook

Hello, How can i set the workbook so that when opened, a dialogu
appears asking for password to open up the workbook before being abl
to read or Read/write anything....

Thanks a lot
From Joh

--
Neo
-----------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3032
View this thread: http://www.excelforum.com/showthread.php?threadid=53146

0
4/10/2006 10:09:29 AM
excel 39879 articles. 2 followers. Follow

10 Replies
487 Views

Similar Articles

[PageSpeed] 22

One simple way, although the password input is not masked

'-----------------------------------------------------------------
Private Sub Workbook_Open()
'-----------------------------------------------------------------
Dim ans
    ans = InputBox("Please supply password")
    If ans <> "password" Then
        Me.Close False
    End If
End Sub

'This is workbook event code.
'To input this code, right click on the Excel icon on the worksheet
'(or next to the File menu if you maximise your workbooks),
'select View Code from the menu, and paste the code



-- 
 HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Neo1" <Neo1.261mmm_1144663800.9501@excelforum-nospam.com> wrote in message
news:Neo1.261mmm_1144663800.9501@excelforum-nospam.com...
>
> Hello, How can i set the workbook so that when opened, a dialogue
> appears asking for password to open up the workbook before being able
> to read or Read/write anything....
>
> Thanks a lot
> From John
>
>
> -- 
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=531467
>


0
bob.phillips1 (6510)
4/10/2006 10:23:37 AM
Check the "PasswordBook.zip" link at
http://www.ozgrid.com/download/default.htm. It is very useful with some
personal changes in the code.

0
pwpd406 (10)
4/10/2006 10:25:33 AM
Bob Philips I tried putting in your code but the following error messag
when i opened my spreadsheet model appeared:

Compile error:

Ambiguous name detected: Workbook_open

How can i solve this?

Thanks a lot
From Joh

--
Neo
-----------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3032
View this thread: http://www.excelforum.com/showthread.php?threadid=53146

0
4/10/2006 7:27:22 PM
That means you already have a Workbook_Open procedure. You probably need to
merge them. Can you post the code from the other one?

-- 
 HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Neo1" <Neo1.262cjy_1144697400.3769@excelforum-nospam.com> wrote in message
news:Neo1.262cjy_1144697400.3769@excelforum-nospam.com...
>
> Bob Philips I tried putting in your code but the following error message
> when i opened my spreadsheet model appeared:
>
> Compile error:
>
> Ambiguous name detected: Workbook_open
>
> How can i solve this?
>
> Thanks a lot
> From John
>
>
> -- 
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=531467
>


0
bob.phillips1 (6510)
4/10/2006 8:45:57 PM
Yeah it is...


Private Sub Workbook_Open()
Worksheets("Main Menu").Activate
End Sub

Which basically opens up the Main Menu worksheet whenever i open the
spreadsheet model file..

Thanks a lot
From John


-- 
Neo1
------------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30329
View this thread: http://www.excelforum.com/showthread.php?threadid=531467

0
4/10/2006 11:28:29 PM
I'm not Bob, but you could try this:


Private Sub Workbook_Open()
Dim ans
    ans = InputBox("Please supply password")
    If ans <> "password" Then
        Me.Close False
    End If
   Worksheets("Main Menu").Activate
End Sub




Neo1 wrote:
> 
> Yeah it is...
> 
> Private Sub Workbook_Open()
> Worksheets("Main Menu").Activate
> End Sub
> 
> Which basically opens up the Main Menu worksheet whenever i open the
> spreadsheet model file..
> 
> Thanks a lot
> From John
> 
> --
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=531467

-- 

Dave Peterson
0
petersod (12005)
4/10/2006 11:51:22 PM
I was well out of it by this time <g>

-- 
 HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:443AEF7A.C670B139@verizonXSPAM.net...
> I'm not Bob, but you could try this:
>
>
> Private Sub Workbook_Open()
> Dim ans
>     ans = InputBox("Please supply password")
>     If ans <> "password" Then
>         Me.Close False
>     End If
>    Worksheets("Main Menu").Activate
> End Sub
>
>
>
>
> Neo1 wrote:
> >
> > Yeah it is...
> >
> > Private Sub Workbook_Open()
> > Worksheets("Main Menu").Activate
> > End Sub
> >
> > Which basically opens up the Main Menu worksheet whenever i open the
> > spreadsheet model file..
> >
> > Thanks a lot
> > From John
> >
> > --
> > Neo1
> > ------------------------------------------------------------------------
> > Neo1's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=30329
> > View this thread:
http://www.excelforum.com/showthread.php?threadid=531467
>
> -- 
>
> Dave Peterson


0
bob.phillips1 (6510)
4/11/2006 7:57:40 AM
There seems to be a problem with the code you gave me...when i open th
excel file all i get is a dialogue box with the password I entered a
the title and then a text box...I tried typing in the password which i
the title and then i click ok and it just closes the spreadshee
model....

How can i fix this?

Thanks
From Joh

--
Neo
-----------------------------------------------------------------------
Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=3032
View this thread: http://www.excelforum.com/showthread.php?threadid=53146

0
4/11/2006 10:36:25 PM
Make sure you're typing the password in the correct case (Upper and Lower).

If you're using this code:

Private Sub Workbook_Open()
Dim ans
    ans = InputBox("Please supply password")
    If ans <> "password" Then
        Me.Close False
    End If
   Worksheets("Main Menu").Activate
End Sub

make sure you type the word "password" (w/o the double quotes) in all lower
case.

You can avoid the open macros (Auto_Open or Workbook_Open) by depressing the
shift key when you open the workbook.

Another way is to turn the macro security level to high (or medium and answer no
to the allow macros prompt).  Then open the workbook.


Neo1 wrote:
> 
> There seems to be a problem with the code you gave me...when i open the
> excel file all i get is a dialogue box with the password I entered as
> the title and then a text box...I tried typing in the password which is
> the title and then i click ok and it just closes the spreadsheet
> model....
> 
> How can i fix this?
> 
> Thanks
> From John
> 
> --
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=531467

-- 

Dave Peterson
0
petersod (12005)
4/11/2006 11:07:49 PM
A far simpler way would of been to use the Excel "File Save As" - Tools -
General Options - Password To Open Routine

In the Army, we had a saying,     KISS.

Keep
It
Simple
Stupid.

Saruman
----------------------------------------------------------------------------
-------
All Outgoing Mail Checked By Norton Anti-Virus 2003
----------------------------------------------------------------------------
-------
"Neo1" <Neo1.261mmm_1144663800.9501@excelforum-nospam.com> wrote in message
news:Neo1.261mmm_1144663800.9501@excelforum-nospam.com...
>
> Hello, How can i set the workbook so that when opened, a dialogue
> appears asking for password to open up the workbook before being able
> to read or Read/write anything....
>
> Thanks a lot
> From John
>
>
> --
> Neo1
> ------------------------------------------------------------------------
> Neo1's Profile:
http://www.excelforum.com/member.php?action=getinfo&userid=30329
> View this thread: http://www.excelforum.com/showthread.php?threadid=531467
>


0
saruman (40)
4/16/2006 6:20:01 PM
Reply:

Similar Artilces:

Links error when insert line/row to source workbook
I have a question regarding links on Microsoft Excel 2003. If I insert a line into the source spreadsheet, the link on the destination spreadsheet doesn't work anymore because the cells moved. The scenario: On the destination spreadsheet, the link is =[ACME.xls]Sheet1'!A1 But if I insert a line on ACME.xls, making the info in cell A1 move down to A2, the link on the destination spreadsheet still pulls from cell A1. How do I ensure that when I insert/delete lines/row, the link still pulls info from the correct cell? Thanks Stella If you have the workbook with the fo...

H E L P * * * Need help with question about protecting a range of cell in workbook
I need to know how to protect a range of cell/s in a workbook ...

input box upon workbook open
I want to have an input box that will ask for a date when a workbook is opened. I want to be able to us the date that is input in code that will be run from a macro. The reason I want the input box upon open instead of when the macro is run, is because the end user uses the file repeatedly for multiple calculations. This date will be applied to all of the calculations, and I don't want the user to have to enter the same date over and over. I assume that I need something like a "public enddate as date" in the ThisWorkbook object. This however doesn't work. What do I need ...

Formula copying from one workbook to another...
Hello Excel community friends. Here's my problem: I trying to copy a formula from a worksheet in one workbook to a worksheet (of the same name and same cell location) in another workbook. Say the formula from workbook1/worksheet1 is =sum(1+1) and the name of workbook1 is "Me" and the name of the worksheet1 is "Sheet1" and located in cell A1. Of course, when you copy the formula from "Me" to another workbook (named, say, "You") and to the same location (A1) and on the same named worksheet, "Sheet1", the preface of the formula is s...

How to prevent any one from opening my workbook
I created a personal data workbook stored in my company network. I do not want any one in the office to be able to open it and read it. The "Protect" feature under the Tools does NOT prevent someone from opening and reading the data (unless I am doing something wrong!). If they are smarter than the "average aggie" they will be able to open it, no matter what you do. -- Don Guillett SalesAid Software dguillett1@austin.rr.com "MMCM" <MMCM@discussions.microsoft.com> wrote in message news:6AE86D02-DC24-4451-B0AD-9569491881F6@microsoft.com... >I creat...

My password don't work on my MS Money 2004 Business edition
Hi everyone, I am panicing.My Microsoft Money Small Business Edition password is not working. Somehow my password changed. All my business data and personal financial data is on there and i don't know what to do. About two days my password does not work. I did not change anything. I wanted to print an invoice and it wouldn't allow me to. It would not allow me to go further without a password. Is there a solution to this problem or I am just doomed. Please do a search... if you did a very little superficial search, you will notice MANY people having the same problem. >-----Or...

Error message with copying sheet to another workbook
I always encounter an error message when i copy a sheet from one workbook to another workbook. The error message is as below: ================ A formula or sheet you want to move or copy contains the name '____123graph_A', which already exists on the destination worksheet. Do you want to use this version of the name? - to use the name as defined in the destination sheet, click Yes - to rename the range referred to the formula or worksheet, click No, and enter a new name in the Name Conflict dialog box. ================ I have tried to click No and enter a new Name, but afterward...

Slow to Open, Small Workbook <2MB, HTML Paste, VBA procedures
I have a small Excel 2003 workbook 1,300kb that takes 3 to 5 minutes to open. It was created in 2006 and has been opened daily since then. One sheet in the book is overwritten each morning with a paste from a web site. That one sheet has litterly thousands of VBA procedures like the one below (No code just the Sub - end sub). They must be being created automatically from the html paste each morning. Private Sub HTMLHidden999_Click() End Sub I suspect upon open, VBA is inspecting and compiling each sub causing the slow to open problem. 1) Am I correct?...

Sharing a Workbook
We are running Excel 2003 on various XP computers on a peer-to-peer network. We do not have Windows 2003 server or sharepoint. So: - How do we set up an Excel workbook so that two people can work on it at the same time? - Do we need Sharepoint, and if so can we install Sharepoint on an XP PC without having a Windows 2003 server? Thanks in advance. Robert -- Posted via a free Usenet account from http://www.teranews.com Abacus, You can set up a workbook as shared, within Excel. I'm not sure how solid it is -- there have been some issues raised here and there. It lets multi...

Excel 2000 Workbook close button hides instead of close
We received an excel file in email. When we click the Workbook close button (the X) it hides the work book instead of closing it. When we unhide it, something changes and the close button works as normal, but we are asked to save changes even if we don't make any. Looks like there is some code in the background doing something or other. I'd check the workbook code, particulary the Workbook_BeforeClose event. It is more likely some code or functions are changing the worksheet contents than a bug in Excel. -- Regards, Bill Lunney www.billlunney.com "Steven Robinson" &...

Keeping 2 Excel workbooks open at the same time
I was able to have 2 workbooks open at the same time on a wide screen laptop, and somehow my settings must have gotten modified. Now I can only open 1 workbook at a time. Each time that I attempt to open a 2nd one, the first one is minimized. How do I correct this? Thanks for your help -- Royal How about just window|Arrange|Tiled (or whatever you want) Royal wrote: > > I was able to have 2 workbooks open at the same time on a wide screen laptop, > and somehow my settings must have gotten modified. Now I can only open 1 > workbook at a time. Each time that I attempt to open a...

Win 7 UAC and Passwords
About to take delivery of a new Win7 box and I'm curious about assigning passwords I found this page http://unixwiz.net/techtips/win7-limited-user.html Which includes an interesting paragraph Curiously enough, it's not always necessary to have a password on an account. Since an account with a blank password cannot be accessed over the network, you can substantially reduce the attack surface of a machine this way. But this requires that you have good control of physical security over the machine: if there are users on the machine (or in the environment) who are ...

Problem making versions of a table by changing sourse data in another workbook
Hello How to make a version of a table by changing source data in another workbook and retain original version of the table easily? I lose the original version of the table if I change the source data in the other workbook even if I make a copy of the original table workbook. I have to recreate all links if I make copies of the original table workbook and the source workbook. Hi! Have you tried making a "snapshot" of the worksheet? (Converting the formulae into their values - fixed forever - using copy/paste special values) Just don't do it unless you have a secure copy ...

launching excel icon results in not opening workbook
when I launch excel thru a file in my documents, I get a new workbook, but when I open the file from within escel it works. Also when I launch by clicking an attached outlook excel file it does not launch (file not found message). Does anyone have any idea what is going on here? Sometimes one of these works: Tools|Options|General|Ignore other applications (uncheck it) --- or --- Close Excel and Windows Start Button|Run excel /unregserver then Windows Start Button|Run excel /regserver The /unregserver & /regserver stuff resets the windows registry to excel's factory defaults....

Listing linked workbooks
My workbook contains many links to external workbooks (about 20) maintained by others in my group. Each of the external workbooks gets updated monthly, and renamed. I manually change links as the new workbooks are posted. I'm looking for a way to list the current filename of all of the external workbooks so that users can which version of the external files are being used. I've tried using the cell("filename",reference) function, but this only works when the external workbooks are open. Once they are closed, the formula gives #NA. I have also played around with the Link F...

SELECT INTO Password protected db
I have a situation where I need to copy a lot of records as is, time stamp and all, from one database to another database. The problem is that both databases are password protected. I can send the password to one of the two in the connection string, but I'm at a loss on how to send the password to the other database. Thanks; Amy ...

Can I get Outlook 2003 to automatically respond to a Password requ
My issue is with e-mail and Outlook 2003 intermittently showing a dialog box asking for a particular POP3 accounts Password. I know this is a problem with my ISP’s POP3 server not getting authentication from its auth server when it gets busy, I have verified this with Ethereal traces. The problem is the next mail check will most likely work only if I can get it to check automatically. The problem is the requires human intervention to click OK in the password request box. This is particularly a problem when away; first my PC is not pulling e-mails off my POP server causing me to possibl...

Linking Multiple Workbooks #2
Hi Guys, I have 40 different workbooks representing the sales for 40 differen regions. Each region has identical spreadsheets. I want to make summary sheet of total sales and related expenses. It is not possibl to have all regions in the same workbook under different tabs. therefore need to do a sum whereby the sum function is linked to 4 workbooks. I have all workbooks located in one folder. Is there an way to make this sum formula easier so that I do not have to go int each workbook and like the cell to the sum function. =[test1.xls]Sheet1!$B$3 + [test2.xls]Sheet1!$B$3 [test3.xls]...

copying chart to location within same workbook
I have created a chart that I wish to use as a template for many other charts in the same workbook. I copy it by right-clicking on the tab, ‘name of chart' sheet, select ‘move or copy’, tick the ‘create a copy’ box and okay. I have done this hundreds of times in Excel over the last year, but now I get the message: A formula or sheet you want to move or copy contains the name 'check', which already exists on the destination worksheet. Do you want to use this version of the name? To use the name as defined in the destination sheet, click Yes. To rename the range refe...

Continuous page numbers thoughout a workbook?
Does anyone know if you can set up a workbook to print with continuous page numbers without going into each sheet and changing the beginning page number? Page, Edit | Page Setup | Headers and Footers.....create a header or footer. Click the custom header or footer. It is much like MS Word. HTH Regards, Kevin "pagenumbers" <anonymous@discussions.microsoft.com> wrote in message news:1317F8A9-18EC-4F0E-AB8E-1EB777B0CA13@microsoft.com... > Does anyone know if you can set up a workbook to print with continuous page numbers without going into each sheet and changing the be...

Links Between Workbooks (Again)
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I have established links between Workbook &quot;A&quot; and each of 13 other workbooks. <br><br>1. When I change a linking formula in &quot;A&quot;, the &quot;Link&quot; dialogue box opens and asks me to re-define the link (i.e. to the appropriate workbook the new formula references). <br><br>2. When I open &quot;A&quot;, the &quot;Link&quot; dialogue tells me it cannot find any of the 13 source files, asking me to re-define all the links, even tho...

Replacing in whole workbook
I am using excel 2007 when I try to find and replace in the workbook it asks me for a file name and no matter what I do it keeps asking me and does nothing. The workbook has 6500 items I need to place the same information. I would hate to have to do each one separately. Is there a way to do it. I checked on the Internet and it seems that there is software out there that will do what I want but do not want to have to pay for it where I am only going to use it once a month. -- Ed Davis I tired to select all sheets and got the same results. I want to find "-07-" and replac...

How to evaluate the size of each worksheet in a workbook?
I have a 30+ worksheets in a workbook that is to big.... I would like to know which one are the top memory eater, so I can concentrate my effort on these one. Thanks for your help If you want to know which one try creating the Table of Contents described in http://www.mvps.org/dmcritchie/excel/buildtoc.htm which will tell you how many cells are in the used area. If you want to just try to fix lastcell problems then run the macro # Why do my scrollbars go to row 500 -- my data ends in cell E50?, contextures.com, Debra Dalgleish. The basis of deletions is all columns without content, ...

"Cleaning" an Excel workbook
We are going to be entering data in an Excel spreadsheet, and need to guarantee accuracy. Our plan is to create two identical spreadsheets, have two people enter data, then check that they are the same - but how??? By merging them? Or is there a better way to do this check? Please help - thanks! If you mean cell by cell comparison (a1 with a1, x99 with x99), you can use a program written by Myrna Larson and Bill Manville. You can find a copy on Chip Pearson's site: http://www.cpearson.com/excel/whatsnew.htm look for compare.xla Pizza wrote: > > We are going to be enteri...

GP V8 Password #2
Just check if you are logging in as 'sa' Thanks Janakiram M.P. MCP-GP --------------= Posted using GrabIt =---------------- ------= Binary Usenet downloading made easy =--------- -= Get GrabIt for free from http://www.shemes.com/ =- ...