Results 1 to 6 of 6

Starting Point For Form

Threaded View

markrennolds Starting Point For Form 03-23-2010, 04:53 PM
royUK Re: Starting Point For Form 03-23-2010, 04:57 PM
kym1901 Re: Starting Point For Form 03-23-2010, 04:58 PM
contaminated Re: Starting Point For Form 03-23-2010, 04:59 PM
dominicb Re: Starting Point For Form 03-23-2010, 05:00 PM
markrennolds Re: Starting Point For Form 03-23-2010, 05:34 PM
  1. #1
    Registered User
    Join Date
    07-15-2009
    Location
    Manchester, England
    MS-Off Ver
    Excel 2007
    Posts
    77

    Starting Point For Form

    Hi All

    I have the following code for a user form that works fine, however I am new to userforms & cannot find how to get the cursor to start in the text box that i want, and after the user has submitted the data for it to return to this point. I know its probably being very daft of me but i cannot get the code correct.
    The text box I want as starter point is called TextBoxSurname

    The code at moment is:

    Private Sub CommandButtonSUBMIT_Click()
    
        Dim lrow As Long
        
        lrow = Sheet1.Cells(Rows.Count, 1).End(xlUp).Row + 1
        
        With Sheet1
            .Range("a" & lrow) = Me.TextBoxSurname.Value
            .Range("B" & lrow) = Me.TextBoxPostcode.Value
            .Range("C" & lrow) = Me.TextBoxMobile.Value
            .Range("I" & lrow) = Me.cboMobile_BB.Value
            .Range("D" & lrow) = Me.TextBoxHomeNumberSTD.Value
            .Range("E" & lrow) = Me.TextBoxMain.Value
            .Range("F" & lrow) = Me.TextBoxStartDate.Value
            .Range("G" & lrow) = Me.TextBoxEnddate.Value
            .Range("H" & lrow) = Me.cboBusiness.Value
        End With
        Unload Me
        frmDataInput.Show
    
    End Sub
    cheers
    Mark
    Last edited by markrennolds; 03-23-2010 at 05:34 PM.

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