+ Reply to Thread
Results 1 to 2 of 2

UserForm to input data into sheet(s)

Hybrid View

Shea2288 UserForm to input data into... 05-04-2016, 11:03 AM
mehmetcik Re: UserForm to input data... 05-04-2016, 04:30 PM
  1. #1
    Registered User
    Join Date
    10-16-2014
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    16

    UserForm to input data into sheet(s)

    I have a ListBox that gets its values from each sheet name within my workbook (See picture). I would like to fill in the text boxes and have the Submit button enter the data into the selected sheets from the listbox. It could be only one sheet selected or it could be all depending on the situation. I need the program to look for the next available row and insert the data. I hope I explained that in a decent way. Thanks in advance.
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by Shea2288; 05-04-2016 at 11:33 AM. Reason: Added Workbook

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: UserForm to input data into sheet(s)

    
    Private Sub CommandButton1_Click()
    ALR = Sheets(1).Cells(Rows.Count, 1).End(xlUp).Row + 1
    
    For Count = 0 To ListBox1.ListCount - 1
    If ListBox1.Selected(Count) = True Then
    LR = Sheets(Count + 2).Cells(Rows.Count, 1).End(xlUp).Row + 1
    For TCount = 1 To 4
    Sheets(1).Cells(ALR, TCount).Value = Me.Controls("Textbox" & TCount).Value
    Sheets(Count + 2).Cells(LR, TCount).Value = Me.Controls("Textbox" & TCount).Value
    Next
    Sheets(1).Cells(ALR, 5).Value = ListBox1.List(Count)
    ALR = ALR + 1
    End If
    Next
    End Sub
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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] Check if an input in a userform is contained in a column of a target sheet
    By emymeeky in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-15-2014, 09:10 AM
  2. userform to input data
    By bqheng in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 12-14-2014, 02:58 PM
  3. Replies: 4
    Last Post: 11-28-2012, 06:09 PM
  4. [SOLVED] Userform only to input data to Sheet only if textbox contains data/number.
    By BPSJACK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-31-2012, 11:30 AM
  5. VBA Help need for Time sheet update besed on UserForm input.
    By krjoshi in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-20-2011, 09:40 AM
  6. Select sheet based on userform date input
    By mugitty in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-22-2006, 05:37 PM
  7. Use userform to get input and compare to a hidden sheet
    By cwwolfdog in forum Excel General
    Replies: 12
    Last Post: 03-23-2005, 09:06 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