1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Insert row into Excel using VBA

Discussion in 'Software Development' started by gj0519, Oct 16, 2003.

Thread Status:
Not open for further replies.
  1. gj0519

    gj0519 Thread Starter

    Joined:
    Oct 16, 2003
    Messages:
    1
    I am trying to insert a row at specific ranges throughout my worksheet. I can get the row to insert, but not where I want it.
    Here is what I have so far. This inserts at G4, not where lngValue is < 700.


    Private Sub CommandButton1_Click()
    Dim lngValue As Long

    Range("G4").Select 'active cell at column heading FISC
    lngValue = 0
    Do While lngValue < 700
    ActiveCell.Offset(1, 0).Select
    lngValue = ActiveCell.Value
    Loop
    ActiveCell.EntireRow.Insert
    End Sub

    Thanks,
    gj0519
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/172427

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice