Novice Looking For Help
Novice Looking For Help
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 4 of 4

Thread: Novice Looking For Help

  1. #1
    New Member
    Join Date
    Apr 2002
    Location
    East Texas
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have a userform with 3 text boxes. When the user clicks the command button it places the contents of the textboxes on sheet 1 (row 1 column B). What is happening is that each time the commandbutton is clicked it replaces the text already on sheet one. I need a code that will look for the last row and last column that has data and place the contents in the next empty cell and column.

    Thanks in Advance

  2. #2
    Board Regular
    Join Date
    Mar 2002
    Location
    =ActiveCell.Address
    Posts
    478
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Hiya,

    Could you adapt something like the following for your purposes...

    Say you're filling in Column A

    Sub FillDataFromTextbox

    Dim Lastrow As Integer

    Lastrow = Range("A65536").End(xlUp).Row

    Range("A" & Lastrow + 1).Value = Userform1.Textbox1.Value

    End Sub

    Rgds
    AJ

  3. #3
    Board Regular
    Join Date
    Feb 2002
    Location
    Where the wild roses grow
    Posts
    285
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I have something very similar to this. I put this code into my command button:

    Columns("B:B").Insert Shift:=xlToRight
    Range("A1").Select

    I have code in each of my textboxes along the lines of:

    Worksheets("sheet1").range("b1").value=textbox1

    so that as soon as your answer goes into textbox1, it appears on your sheet. When you click the command button at the end, it inserts a row, shifting your answers to column C, archiving them

  4. #4
    New Member
    Join Date
    Apr 2002
    Location
    East Texas
    Posts
    38
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    Thanks AJ, just what the Dr. ordered

User Tag List

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
  •  

 

 
DMCA.com