Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    User form query (2003 SP2)

    Editted at 07:49 to ask another question at the bottom:

    Good morning

    I have woken up with my thick head on (ouch, I can here the chorus already "Whats new there then")

    To enter data from a userform to a worksheet I have

    With ws
    .Cells(Irow, 1).Value = Me.cboName
    .Cells(Irow, 2).Value = CDate(Me.txtDateFrom.Value)
    .Cells(Irow, 3).Value = CDate(Me.txtDateTo.Value)
    .Cells(Irow, 4).Value = Me.cboLeaveType.Value
    .Cells(Irow, 6).Value = Me.TxtAuthorised
    End With

    'Irow, 1', I think must refer to Column A, so if I wanted to start in Column BB would I put 'Irow, 54' or could I just put 'Irow, BB'

    Cheers

    Steve

    Edit:

    If I wanted to store the information on another worksheet, for example sheet5 how would I add that into the code?

    ta
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: User form query (2003 SP2)

    You can use either .Cells(lrow, 54) or .Cells(lrow, "BB")
    Note that you must put quotes around the column indication if you use letters.

    If you want to store the information on Sheet5, change

    With ws

    to

    With Worksheets("Sheet5")

  3. #3
    5 Star Lounger
    Join Date
    Aug 2001
    Location
    Surrey, United Kingdom
    Posts
    1,001
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: User form query (2003 SP2)

    Thanks Hans

    That has helped a lot

    Cheers

    Steve
    Cheers

    Steve

    Asking the questions everbody wants the answers too but feels too stupid to ask themselves :-)

Posting Permissions

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