Page 2 of 2 FirstFirst 12
Results 11 to 14 of 14

Thread: Adding Data to diffrent worksheets from userform
Thanks Thanks: 0 Likes Likes: 0

  1. #11
    New Member
    Join Date
    Aug 2019
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Adding Data to diffrent worksheets from userform

    First i want to tell you thanks alot for helping me. there are a few more things i want help with on this file. I wanted to do it is steps.

    Everything is working GREAT ! But i want to work a couple things out.

    1. I want my text box 1 and combobox to be clean after i click transfer data so i can add new data.
    2. would like the part of code to be taken off that says: Worksheets("Master Sheet").Activate AND Worksheets("Master Sheet").Cells(1, 1).Select
    and replace with the code that will take me to the sheet i just added data to so i can see that it was entered.
    I belive you can just add a couple lines of code to make this happen.

    Thanks Again for all your help,

    Dennis



  2. #12
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,353
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Adding Data to diffrent worksheets from userform

    How about
    Code:
    Private Sub CommandButton1_Click()
       targetsheet = ComboBox1.Value
       If targetsheet = "" Then Exit Sub
       
       With Worksheets(targetsheet)
          On Error GoTo NoBlanks
          .Range("A3:A24").SpecialCells(xlBlanks)(1).Value = TextBox1.Value
          On Error GoTo 0
       End With
       Worksheets(targetsheet).Activate
       Me.ComboBox1.Value = ""
       Me.TextBox1.Value = ""
    Exit Sub
    NoBlanks:
       MsgBox "No more blanks in sheet " & targetsheet & " range A3:A24"
    End Sub
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #13
    New Member
    Join Date
    Aug 2019
    Posts
    11
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Adding Data to diffrent worksheets from userform

    I decided i want to add one yes or no option button into my userform. So how do i write the code for that. what i want to do is add a name in text box 1 and select from a combo box1 then select YES or NO option boxes and put that name (Textbox 1 and Combox 1) starting with cells A35 thru A39.
    so another words if i select YES on the option button it will send the info in text box1 and combox 1 to cells A3 thru A24 and if i select NO the info in text box1 and combox 1 will go into cells A35:A39.
    also i want the all of the form to be cleared when i click transfer data so it will be ready for next entery.

  4. #14
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    28,353
    Post Thanks / Like
    Mentioned
    471 Post(s)
    Tagged
    47 Thread(s)

    Default Re: Adding Data to diffrent worksheets from userform

    As this is a completely different question, you will need to start a new thread.
    Thanks
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

Some videos you may like

User Tag List

Tags for this Thread

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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