Results 1 to 5 of 5

Thread: INPUT DATA FORM ON WORK SHEET

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Member Ryan_Bernal's Avatar
    Join Date
    Dec 2012
    Posts
    37
    Rep Power
    0

    INPUT DATA FORM ON WORK SHEET

    Can someone help me on my workbook?
    I have "add data" form. It is working but i want to add sheet name on drop down list ( automatically list down the database sheets).
    So that i can choose which database should the data on the text boxes should be place .
    As of now i can only add data to database 2010 sheet and i want to add more sheet (Database 2011,Database 2012...etc)
    Here is my code and workbook:
    Code:
    Private Sub cmdAdd_Click()
        Dim lRow As Long
        Dim inputWks As Worksheet
        Dim ws As Worksheet
        Set ws = Worksheets("Database 2010")
         ' Find emtpy row
        lRow = ws.Cells(Rows.Count, 4).End(xlUp).Offset(1, 0).Row
         'Add data to worksheet
        ws.Cells(lRow, "C") = Me.txtJobNo.Value
        ws.Cells(lRow, "D") = Me.txtJobName.Value
        ws.Cells(lRow, "E") = Me.txtRal.Value
        ws.Cells(lRow, "F") = Me.txtArea.Value
        ws.Cells(lRow, "G") = Me.txtPwdrUse.Value
        ws.Cells(lRow, "H") = Me.txtPercent.Value
        ws.Cells(lRow, "I") = Me.txtGasLtr.Value
        ws.Cells(lRow, "J") = Me.txtPwdrCost.Value
        ws.Cells(lRow, "K") = Me.txtGasCost.Value
        ws.Cells(lRow, "L") = Me.txtCoverage.Value
        ws.Cells(lRow, "M") = Me.txtTotalCost.Value
        ws.Cells(lRow, "N") = Me.txtRemarks.Value
         'Clear userform
        txtJobName.Value = vbNullString
        txtJobNo.Value = vbNullString
        txtRal.Value = vbNullString
        txtArea.Value = vbNullString
        txtPwdrUse.Value = vbNullString
        txtPercent.Value = vbNullString
        txtGasLtr.Value = vbNullString
        txtPwdrCost.Value = vbNullString
        txtGasCost.Value = vbNullString
        txtCoverage.Value = vbNullString
        txtTotalCost.Value = vbNullString
        txtRemarks.Value = vbNullString
       
    End Sub
    
    Private Sub cmdReset_Click()
        txtJobName.Value = ""
        txtJobNo.Value = ""
        txtRal.Value = ""
        txtArea.Value = ""
        txtPwdrUse.Value = ""
        txtPercent.Value = ""
        txtGasLtr.Value = ""
        txtPwdrCost.Value = ""
        txtGasCost.Value = ""
        txtCoverage.Value = ""
        txtTotalCost.Value = ""
        txtRemarks.Value = ""
    End Sub

    Thanks in advance!
    Attached Files Attached Files
    Last edited by Admin; 12-30-2012 at 03:30 PM. Reason: code tag added

Similar Threads

  1. Populate data in form
    By Ryan_Bernal in forum Excel Help
    Replies: 4
    Last Post: 02-01-2013, 10:18 AM
  2. Search form on work sheet
    By Ryan_Bernal in forum Excel Help
    Replies: 5
    Last Post: 01-15-2013, 11:46 AM
  3. Replies: 2
    Last Post: 12-26-2012, 08:31 AM
  4. Extract multiple data matching with input
    By excel_learner in forum Excel Help
    Replies: 1
    Last Post: 02-13-2012, 06:08 PM
  5. obtain data from 3 input with conditions
    By mtsf26 in forum Excel Help
    Replies: 13
    Last Post: 11-11-2011, 08:49 AM

Tags for this Thread

Posting Permissions

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