1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Add Data macro

Discussion in 'VBA Macros' started by delta, Apr 15, 2018.

  1. delta

    delta Member

    data add from multiple text box in worksheet "DATA"
    in given macro do not work what is correction in macro
    i attache the sample file

    Attached Files:

  2. Logit

    Logit Active Member

    Here is a sample database. Although there are only a few fields to fill in from the User Form ... the process can be expanded to accommodate as many fields as needed. Such as the form you are implementing :

    Code (vb):
    Option Explicit
    Private Sub btnCancel_Click()
        Unload Me
    End Sub

    Private Sub btnOK_Click()
        Dim ws As Worksheet
        Set ws = Worksheets("Customers")
        Dim newRow As Long
        newRow = Application.WorksheetFunction.CountA(ws.Range("A:A")) + 1
        ws.Cells(newRow, 1).Value = Me.txtFirstName.Value
        ws.Cells(newRow, 2).Value = Me.txtSurname.Value
    End Sub
    Sub CommandButton1_Click()
    End Sub

    Attached Files:

  3. Luke M

    Luke M Excel Ninja


    Please remember that while it's certainly and allowed and encouraged to post the same question on different forums (aka cross-posting), we ask that you provide the links to the question, so all may see if the question has already been answered.


    also the same question reworded at:

Share This Page