+ Reply to Thread
Results 1 to 3 of 3

Insert New Row with Data from Userform

  1. #1
    Registered User
    Join Date
    11-19-2015
    Location
    Ohio
    MS-Off Ver
    2010
    Posts
    7

    Insert New Row with Data from Userform

    I have made a Userform that allows the user to input data from budgeting transactions. The way it currently works is that it will input the user data in the very next available empty row. I am trying to how this same input data be inserted in new cells B6:G6, transferring all of the previous cell down a row. I want to happen each time a new transaction is entered.

    The following code is how it is currently set up to handle the input data:
    Private Sub OKButton_Click()
    Dim emptyRow As Long

    With Sheets("Daily Ledger")
    emptyRow = .Cells(Rows.Count, "B").End(xlUp).Row + 1

    'Transfer information
    .Cells(emptyRow, 2).Value = DateTextBox.Value
    .Cells(emptyRow, 3).Value = DescriptionTextBox.Value
    .Cells(emptyRow, 4).Value = CategoryComboBox.Value
    .Cells(emptyRow, 5).Value = SubCategoryComboBox.Value
    .Cells(emptyRow, 6).Value = AmountTextBox.Value
    .Cells(emptyRow, 7).Value = IIf(TransactionOptionButton1.Value = True, "Debit", "Credit")
    End With
    Unload Me
    End Sub

    Thanks for the help!
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    7,740

    Re: Insert New Row with Data from Userform

    Please Login or Register  to view this content.
    Please Avoid Joining My List Of Blocked Users by:

    Saying Please and Thank you.

    Making requests not demands.

    Checking back on your post. I will not edit any post after 4 days.

    Marking threads as closed once your issue is resolved. How? The tools at the top

    Any reputation (*) points appreciated. None of us gets paid here.

    If you found someone's input useful, please take a second to click the * at the bottom left to let them know

  3. #3
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,121

    Re: Insert New Row with Data from Userform

    See if this will work for you.

    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Help! Userform VBA to find data in cell and insert into 2 cells over to right.
    By MG3 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-13-2015, 11:52 AM
  2. Insert Userform Data into Outlook Email Template Bookmark
    By twitch73 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-27-2014, 03:44 AM
  3. Insert row to existing table from userform data macro
    By akhalifa in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-11-2013, 12:23 AM
  4. How can I create a mask (Userform) to insert data?
    By balsilo in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-17-2013, 04:16 PM
  5. Userform insert data on the last row even when autofilter is active
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-29-2009, 02:24 PM
  6. Insert column Autofill using userform and then copy data from two spreadsheets
    By rm7302 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-28-2009, 03:31 PM
  7. Insert UserForm Data in Named Range
    By Patchworks in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2009, 10:50 PM

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1