none
Excel VBA - Userform RRS feed

  • Question

  • Input through excel userform

    1 = Lot # = xxxxxx

    2 = Date = entry date

    3 = By = entry by

    4 = Qty = (say 10)

    Output in excel sheet 1

    A2  = lot # + qty = (xxxxxx-001, A3 = xxxxxx-002... A11=xxxxxx-010)

    B2 = date (shall be same from B2:B11)

    C3 = by (shall be same from c2:c11)

     I tried a lot (as for as my knowledge in macro) to achieve above condition but couldn't find perfect solution.

    Could any one help me out to solve this?


    • Edited by harshahc3 Monday, March 31, 2014 11:47 PM
    Monday, March 31, 2014 11:46 PM

All replies

  • h,

    You did not explain where the problem is ocurring.
    This is a generic example...
    '---
    Sub AnExample()
     UserForm1.Show
     Worksheets("Sludge").Range("A2").Value = UserForm1.TextBox1.Value & _
                "  " & UserForm1.TextBox2.Value
     'more code
     Unload UserForm1
    End Sub
    '---
    The userform should have a command button on it that hides the form.
    The code goes in the module behind the userform...
    '---
    Private Sub CommandButton1_Click()
     Me.Hide
    End Sub

    '---
    Jim Cone
    Portland, Oregon USA
    https://goo.gl/IUQUN2 (Dropbox)
    (free & commercial excel add-ins & workbooks)
    • Edited by James Cone Tuesday, October 25, 2016 1:27 AM
    Tuesday, April 1, 2014 2:49 AM