Insert row into Excel using VBA

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top