G
Glenn
I am trying to insert a row at a specific range.
I can get this to work if I manualy enter data into a
worksheet. Where it does not work is when I use VBA in
Access and export the data into Excel at specific ranges.
Any reason why I am not able to insert a row where I tell
when the data is exported from Access?
Here is my code to insert a row.
Private Sub CommandButton1_Click()
Dim lngValue As Long
Range("A1").Select 'active cell at column heading FISC
lngValue = 0
Do While lngValue <= 700
ActiveCell.Offset(1, 0).Select
lngValue = ActiveCell.Value
Loop
'activecell is now on the first row where value is
bigger than 700
ActiveCell.EntireRow.Insert
End Sub
I can get this to work if I manualy enter data into a
worksheet. Where it does not work is when I use VBA in
Access and export the data into Excel at specific ranges.
Any reason why I am not able to insert a row where I tell
when the data is exported from Access?
Here is my code to insert a row.
Private Sub CommandButton1_Click()
Dim lngValue As Long
Range("A1").Select 'active cell at column heading FISC
lngValue = 0
Do While lngValue <= 700
ActiveCell.Offset(1, 0).Select
lngValue = ActiveCell.Value
Loop
'activecell is now on the first row where value is
bigger than 700
ActiveCell.EntireRow.Insert
End Sub