Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8526959
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T08:25:11+00:00 2026-06-11T08:25:11+00:00

I have list of fields (on a sheet) in EXCEL document and a table.

  • 0

I have list of fields (on a sheet) in EXCEL document and a table. I need to add all info from input fields to this table after click the button. I need to write code of event on VBA. Can someone help with exemple how to do this?

Here ia an example of my table:

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T08:25:14+00:00Added an answer on June 11, 2026 at 8:25 am

    Demo of a method for doing this

    enter image description here

    Table name List1
    Text Boxes names TextBox1 and TextBox2
    Button name CommandButton1

    Button click code

    Private Sub CommandButton1_Click()
        Dim lst As ListObject
        Dim rng As Range
        Set lst = Me.ListObjects("List1")
        lst.Range.Activate
        Set rng = lst.InsertRowRange
        rng.Cells(1, lst.ListColumns("Item A").Index) = TextBox1.Value
        rng.Cells(1, lst.ListColumns("Item B").Index) = TextBox2.Value
    End Sub
    

    EDIT

    If the List is on another sheet use this version

    Private Sub CommandButton1_Click()
        Dim lst As ListObject
        Dim rng As Range
        Dim lstRow As ListRow
        Set lst = Me.Parent.Worksheets("Sheet2").ListObjects("List1")
        Set lstRow = lst.ListRows.Add
        Set rng = lstRow.Range
        rng.Cells(1, lst.ListColumns("Item A").Index) = TextBox1.Value
        rng.Cells(1, lst.ListColumns("Item B").Index) = TextBox2.Value
    End Sub
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to build JSON from two fields. Say, I have a list
I have a list of header values from an excel spreadsheet that is set
I have an EXCEL sheet.it has various form-fields that are named as smrBgm133GallonsGross/ smrBgm167GallonsGross
I have a list of numbers in a table resulting from mySQL: How do
How to get objects from the many table record? I have list of rsObjectComments
I have an Excel sheet on which I have created a list consisting of
I need to extract multiple text/dropdown list fields from an asp.net form and format
I have a list of input fields and when I tab through them I
I have this: List<string> fields; fields[0] = firstFieldName; fields[1] = secondFieldName; ... fields[n] =
I get object from hibernate query. Then i have list of fields, whose getters

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.