Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
AOU AOU is offline
external usenet poster
 
Posts: 54
Default Password protected userform

How do I password protect a userform.So that only key people can open a
userform. Also is it possible to change the password in the future?
--
AOU
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Password protected userform

You can change the procedure that shows the userform.

Dim myPWD as string
dim UserPWD as string
mypwd = "hi"
userpwd = inputbox(Prompt:="Password")
if userpwd < mypwd then
msgbox "Not authorized"
exit sub '???
end if
'keep going

You could change the password in the code and redistribute the workbook.

You could store the password in a text file that everyone has access to--but
encrypt that password and then read the string from that text file and translate
it to what you need.



AOU wrote:

How do I password protect a userform.So that only key people can open a
userform. Also is it possible to change the password in the future?
--
AOU


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
AOU AOU is offline
external usenet poster
 
Posts: 54
Default Password protected userform

Thanks Dave. It works well.
I was thinking of storing the password in a worksheet(which is hiden) and
protecting the project. How would I refir the password to a cell in a
worksheet, say sheet3.
--
AOU


"Dave Peterson" wrote:

You can change the procedure that shows the userform.

Dim myPWD as string
dim UserPWD as string
mypwd = "hi"
userpwd = inputbox(Prompt:="Password")
if userpwd < mypwd then
msgbox "Not authorized"
exit sub '???
end if
'keep going

You could change the password in the code and redistribute the workbook.

You could store the password in a text file that everyone has access to--but
encrypt that password and then read the string from that text file and translate
it to what you need.



AOU wrote:

How do I password protect a userform.So that only key people can open a
userform. Also is it possible to change the password in the future?
--
AOU


--

Dave Peterson

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Password protected userform

if userpwd < thisworkbook.worksheets("Sheet13").range("a1").val ue then

If Sheet13 is the name you see on the worksheet tab when that worksheet is
visible.

AOU wrote:

Thanks Dave. It works well.
I was thinking of storing the password in a worksheet(which is hiden) and
protecting the project. How would I refir the password to a cell in a
worksheet, say sheet3.
--
AOU

"Dave Peterson" wrote:

You can change the procedure that shows the userform.

Dim myPWD as string
dim UserPWD as string
mypwd = "hi"
userpwd = inputbox(Prompt:="Password")
if userpwd < mypwd then
msgbox "Not authorized"
exit sub '???
end if
'keep going

You could change the password in the code and redistribute the workbook.

You could store the password in a text file that everyone has access to--but
encrypt that password and then read the string from that text file and translate
it to what you need.



AOU wrote:

How do I password protect a userform.So that only key people can open a
userform. Also is it possible to change the password in the future?
--
AOU


--

Dave Peterson


--

Dave Peterson
  #5   Report Post  
Posted to microsoft.public.excel.misc
AOU AOU is offline
external usenet poster
 
Posts: 54
Default Password protected userform

Dave,
Great stuff. It works a treat.
Thank very much
--
AOU


"Dave Peterson" wrote:

if userpwd < thisworkbook.worksheets("Sheet13").range("a1").val ue then

If Sheet13 is the name you see on the worksheet tab when that worksheet is
visible.

AOU wrote:

Thanks Dave. It works well.
I was thinking of storing the password in a worksheet(which is hiden) and
protecting the project. How would I refir the password to a cell in a
worksheet, say sheet3.
--
AOU

"Dave Peterson" wrote:

You can change the procedure that shows the userform.

Dim myPWD as string
dim UserPWD as string
mypwd = "hi"
userpwd = inputbox(Prompt:="Password")
if userpwd < mypwd then
msgbox "Not authorized"
exit sub '???
end if
'keep going

You could change the password in the code and redistribute the workbook.

You could store the password in a text file that everyone has access to--but
encrypt that password and then read the string from that text file and translate
it to what you need.



AOU wrote:

How do I password protect a userform.So that only key people can open a
userform. Also is it possible to change the password in the future?
--
AOU

--

Dave Peterson


--

Dave Peterson



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
UserForm Password Ola2B Excel Discussion (Misc queries) 1 February 28th 07 02:25 PM
Password Userform help !!!! K1KKKA Excel Discussion (Misc queries) 4 January 10th 07 03:09 PM
Password protected? help!! Jason Excel Worksheet Functions 2 February 24th 06 04:16 PM
how to automate opening a password protected excel file? e.g. a .xls that has a password set in the security tab. Daniel Excel Worksheet Functions 0 June 23rd 05 11:56 PM
bypass password when update linking of password protected file Yan Excel Discussion (Misc queries) 1 February 7th 05 11:29 PM


All times are GMT +1. The time now is 12:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"