+ Reply to Thread
Results 1 to 2 of 2

Thread: Always display data in the first row

  1. #1
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    825

    Always display data in the first row

    Hi,

    I have a userform and everytime I want to send data in the first row, I know how to do it, but...always is a "but", I do not know how to add a row and "old" data to be lowered by one row. I attached a sample file.
    I really appreciate your help!
    thank you
    Attached Files Attached Files
    Last edited by john55; 06-30-2011 at 03:41 PM.
    Regards, John

  2. #2
    Valued Forum Contributor john55's Avatar
    Join Date
    10-23-2010
    Location
    Europe
    MS-Off Ver
    Excel 2007
    Posts
    825

    Re: Always display data in the first row

    hi,
    i solved ii. i recorded a macro and modified a litlle bit the code. it works..
    Private Sub CommandButton1_Click()
     
        Dim ws As Worksheet
         Dim rNextCl As Range
        Dim NextRw As Long
         Rows("4:4").Select
        Selection.Insert Shift:=xlDown
        With Sheet1    'find next empty row using Column H
            NextRw = .Cells(.Rows.Count, 9).End(xlUp).Row + 1
            
            .Cells(4, 6).Value = Now
            .Cells(4, 6).NumberFormat = "dd-mm- hh:mm"
            .Cells(4, 9).Value = Me.TextBox1.Value
            .Cells(4, 10).Value = Me.TextBox2.Value
            .Cells(4, 11).Value = Me.TextBox3.Value
            .Cells(4, 12).Value = Me.TextBox4.Value
            .Cells(4, 13).Value = Me.TextBox7.Value
            .Cells(4, 14).Value = Me.TextBox5.Value
           End With
    thanks
    Regards, John

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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.2.0