Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Inputbox "choose password"

Hi,

I need help to create a code that ask for ""what password do you choose to
have" the first time the user tries to access the sheet.
Then, when the password once is choosed, that password is the one to be
written to get acces to the sheet.

I have several solutions to do this by entering a password in the code, but
I want the user to be able himself to choose his own password.

Any idea's?

Thanks in advance

//Thomas

--
--------------------------------------------------------------
Thomas Jonsson
ec2use - Mer tid för kunden

Telefon: 026-19 70 90
Mobil: 070- 547 80 72
--------------------------------------------------------------


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Inputbox "choose password"

Hi Jonsson

Do you want to run the macro bu clicking on button on a other sheet???

Is it a hidden sheet or so that you only want to show
if the user know the password. ?



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message ...
Hi,

I need help to create a code that ask for ""what password do you choose to
have" the first time the user tries to access the sheet.
Then, when the password once is choosed, that password is the one to be
written to get acces to the sheet.

I have several solutions to do this by entering a password in the code, but
I want the user to be able himself to choose his own password.

Any idea's?

Thanks in advance

//Thomas

--
--------------------------------------------------------------
Thomas Jonsson
ec2use - Mer tid för kunden

Telefon: 026-19 70 90
Mobil: 070- 547 80 72
--------------------------------------------------------------




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Inputbox "choose password"

Try this

It will use the Cell IV1 to store the password
You can hide that column if you want

Sub test()
Dim Pword As Variant
With Sheets("sheet2")
If .Range("IV1").Value = "" Then
Pword = Application.InputBox("Fill in password that you want to use", "something")
If Pword = False Then
MsgBox "Fill in a the password please", _
vbOKOnly, "something"
Exit Sub
Else
.Range("IV1").Value = Pword
End If

Else
Do Until Pword = .Range("IV1").Value
Pword = Application.InputBox("Fill in the password of the Sheet", "something")
If Pword = False Then
MsgBox "Sorry you must know the password to go to this sheet", _
vbOKOnly, "something"
Exit Sub
End If
Loop
End If
.Visible = -1
.Select
End With
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message ...
Hi Ron!

Like this:

I have a button on sheet1 and click that button, put in the password, it
will give me access to sheet2, that is veryhidden.

//Thomas

"Ron de Bruin" skrev i meddelandet
...
Hi Jonsson

Do you want to run the macro bu clicking on button on a other sheet???

Is it a hidden sheet or so that you only want to show
if the user know the password. ?



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message

...
Hi,

I need help to create a code that ask for ""what password do you choose

to
have" the first time the user tries to access the sheet.
Then, when the password once is choosed, that password is the one to be
written to get acces to the sheet.

I have several solutions to do this by entering a password in the code,

but
I want the user to be able himself to choose his own password.

Any idea's?

Thanks in advance

//Thomas

--
--------------------------------------------------------------
Thomas Jonsson
ec2use - Mer tid för kunden

Telefon: 026-19 70 90
Mobil: 070- 547 80 72
--------------------------------------------------------------








  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 45
Default Inputbox "choose password"

Hi Ron,

You gave me exactly the solution I asked for!
I really apprecciate your help with this!
Thanks,

Thomas

"Ron de Bruin" skrev i meddelandet
...
Try this

It will use the Cell IV1 to store the password
You can hide that column if you want

Sub test()
Dim Pword As Variant
With Sheets("sheet2")
If .Range("IV1").Value = "" Then
Pword = Application.InputBox("Fill in password that you want

to use", "something")
If Pword = False Then
MsgBox "Fill in a the password please", _
vbOKOnly, "something"
Exit Sub
Else
.Range("IV1").Value = Pword
End If

Else
Do Until Pword = .Range("IV1").Value
Pword = Application.InputBox("Fill in the password of the

Sheet", "something")
If Pword = False Then
MsgBox "Sorry you must know the password to go to this

sheet", _
vbOKOnly, "something"
Exit Sub
End If
Loop
End If
.Visible = -1
.Select
End With
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message

...
Hi Ron!

Like this:

I have a button on sheet1 and click that button, put in the password, it
will give me access to sheet2, that is veryhidden.

//Thomas

"Ron de Bruin" skrev i meddelandet
...
Hi Jonsson

Do you want to run the macro bu clicking on button on a other sheet???

Is it a hidden sheet or so that you only want to show
if the user know the password. ?



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message

...
Hi,

I need help to create a code that ask for ""what password do you

choose
to
have" the first time the user tries to access the sheet.
Then, when the password once is choosed, that password is the one to

be
written to get acces to the sheet.

I have several solutions to do this by entering a password in the

code,
but
I want the user to be able himself to choose his own password.

Any idea's?

Thanks in advance

//Thomas

--
--------------------------------------------------------------
Thomas Jonsson
ec2use - Mer tid för kunden

Telefon: 026-19 70 90
Mobil: 070- 547 80 72
--------------------------------------------------------------










  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Inputbox "choose password"

You are welcome
Thanks for the feedback

--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message ...
Hi Ron,

You gave me exactly the solution I asked for!
I really apprecciate your help with this!
Thanks,

Thomas

"Ron de Bruin" skrev i meddelandet
...
Try this

It will use the Cell IV1 to store the password
You can hide that column if you want

Sub test()
Dim Pword As Variant
With Sheets("sheet2")
If .Range("IV1").Value = "" Then
Pword = Application.InputBox("Fill in password that you want

to use", "something")
If Pword = False Then
MsgBox "Fill in a the password please", _
vbOKOnly, "something"
Exit Sub
Else
.Range("IV1").Value = Pword
End If

Else
Do Until Pword = .Range("IV1").Value
Pword = Application.InputBox("Fill in the password of the

Sheet", "something")
If Pword = False Then
MsgBox "Sorry you must know the password to go to this

sheet", _
vbOKOnly, "something"
Exit Sub
End If
Loop
End If
.Visible = -1
.Select
End With
End Sub



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message

...
Hi Ron!

Like this:

I have a button on sheet1 and click that button, put in the password, it
will give me access to sheet2, that is veryhidden.

//Thomas

"Ron de Bruin" skrev i meddelandet
...
Hi Jonsson

Do you want to run the macro bu clicking on button on a other sheet???

Is it a hidden sheet or so that you only want to show
if the user know the password. ?



--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jonsson" wrote in message
...
Hi,

I need help to create a code that ask for ""what password do you

choose
to
have" the first time the user tries to access the sheet.
Then, when the password once is choosed, that password is the one to

be
written to get acces to the sheet.

I have several solutions to do this by entering a password in the

code,
but
I want the user to be able himself to choose his own password.

Any idea's?

Thanks in advance

//Thomas

--
--------------------------------------------------------------
Thomas Jonsson
ec2use - Mer tid för kunden

Telefon: 026-19 70 90
Mobil: 070- 547 80 72
--------------------------------------------------------------












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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
inputBox calculations and msgbox or "outputBox" CC Excel Worksheet Functions 0 July 14th 06 09:11 AM
Compile Error in Excel 2004 when Inputbox contains "VBCRLF" QTP Professional Excel Discussion (Misc queries) 1 November 18th 05 11:47 PM
excel.application.run macro1 -- added code to respond "yes" to a inputbox Michael Joe Excel Programming 3 August 13th 04 10:11 PM
InputBox or...to allow nubers formulas and Ranges I mean "Type:=0+1+8" Bero Excel Programming 1 May 9th 04 11:48 PM


All times are GMT +1. The time now is 04:11 AM.

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

About Us

"It's about Microsoft Excel"