Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default change contents of cell to another cell's value via macro or??

I have a spread sheet that has one page with all our users, user names and
passwords. Another sheet has a random password generator. I would like to
be able to change the password for any user by using a macro or a button. I
can do it for all at once but I don't need/want to do that. My password is
store in sheet2 cell A1.

--
Dave Lagergren
Manager - Data Applications
Wireless Management, Inc
Specializing in cellular wireless applications
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default change contents of cell to another cell's value via macro or??

Based on what you described:

Sub pswdchng()
Dim newPswd As String
newPswd = InputBox("Enter New Password.", "CHANGE PASSWORD")
confrmPw = InputBox("Confirm Change by Re-entering New _
Password.", "CONFIRM CHANGE")
If newPswd = confrmPw Then
Worksheets(2).Range("A1") = newPswd
Else
MsgBox "New Password Mismatch, Change Aborted."
End If
End Sub

"Dave Lagergren" wrote:

I have a spread sheet that has one page with all our users, user names and
passwords. Another sheet has a random password generator. I would like to
be able to change the password for any user by using a macro or a button. I
can do it for all at once but I don't need/want to do that. My password is
store in sheet2 cell A1.

--
Dave Lagergren
Manager - Data Applications
Wireless Management, Inc
Specializing in cellular wireless applications

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default change contents of cell to another cell's value via macro or??

Thank you for your response. I probably didn't make myself clear. I have a
worksheet (Sheet2) that will generate a random password and store it in cell
A1 whenever I recalculate the spreadsheet. On Sheet1 I have my employees
listed with user name, etc. I want to be able to use a button to change a
password to the contents of Sheet2 A1. This needs to be done on only one
employee at a time and the rest can't change.

I would envision one of two options: either a separate button for each
employee or a checkbox for each employee and a master button to change
passwords for all selected.

So far I can change all passwords at once but they all change to the same
password - hardly desireable.

--
Dave Lagergren
Manager - Data Applications
Wireless Management, Inc
Specializing in cellular wireless applications


"JLGWhiz" wrote:

Based on what you described:

Sub pswdchng()
Dim newPswd As String
newPswd = InputBox("Enter New Password.", "CHANGE PASSWORD")
confrmPw = InputBox("Confirm Change by Re-entering New _
Password.", "CONFIRM CHANGE")
If newPswd = confrmPw Then
Worksheets(2).Range("A1") = newPswd
Else
MsgBox "New Password Mismatch, Change Aborted."
End If
End Sub

"Dave Lagergren" wrote:

I have a spread sheet that has one page with all our users, user names and
passwords. Another sheet has a random password generator. I would like to
be able to change the password for any user by using a macro or a button. I
can do it for all at once but I don't need/want to do that. My password is
store in sheet2 cell A1.

--
Dave Lagergren
Manager - Data Applications
Wireless Management, Inc
Specializing in cellular wireless applications

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
How can I change a picture depending on a cell's contents LEP Excel Discussion (Misc queries) 1 December 23rd 07 12:16 AM
Change another cell's contents from current cell??? HandsomeJake Excel Discussion (Misc queries) 1 March 12th 07 12:42 AM
How do I make a cell's contents equal to another cell's contents with macro program? mgmcdevitt[_10_] Excel Programming 2 September 15th 05 09:44 PM
How do I change a cell's contents to it's formula's value? Cindy Excel Worksheet Functions 1 July 18th 05 05:55 AM
macro to use a cell's contents as it's name Stephen Simons Excel Programming 2 June 11th 04 08:49 AM


All times are GMT +1. The time now is 05:34 AM.

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"