+ Reply to Thread
Results 1 to 3 of 3

Select cell from a named range

  1. #1
    Registered User
    Join Date
    03-11-2011
    Location
    Dublin
    MS-Off Ver
    Excel 2007
    Posts
    17

    Select cell from a named range

    Hi
    I'm trying to put together a user form to enable users to change their password, I have the code that will select the user name from a specified cell but am looking for the user name to be selected from a named range (UserNames).Below is the code I have any help greatly appreciated.
    Regards
    Spagbog
    [CODE]Private Sub OKButt_Click()
    If RepeatPasswordTextBox <> PasswordTextBox Then
    MsgBox "Passwords do not match please try again.", vbCritical + vbInformation, "Spagbog"
    PasswordTextBox = ("")
    RepeatPasswordTextBox = ("")
    PasswordTextBox.SetFocus
    End If
    If RepeatPasswordTextBox = PasswordTextBox And UserNameTextBox.Value = Range("A2") Then
    Range("A2").Select
    ActiveCell.Offset(0, 1) = RepeatPasswordTextBox.Value
    Unload Me
    End If
    End Sub

  2. #2
    Forum Expert
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    3,054

    Re: Select cell from a named range

    Try:

    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    03-11-2011
    Location
    Dublin
    MS-Off Ver
    Excel 2007
    Posts
    17

    Re: Select cell from a named range (Solved)

    Andrew-R
    Perfect...and such a quick reply..
    Many Thanks

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1