LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default VBA question

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
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
where can I see my question and answer? Yesterday I ask a question IP Excel Discussion (Misc queries) 2 May 10th 08 04:08 PM
Another Question Kris79 Excel Worksheet Functions 1 February 24th 07 10:14 PM
Newbie Question - Subtraction Formula Question [email protected] Excel Discussion (Misc queries) 3 May 5th 06 05:50 PM
The question is an excel question that I need to figure out howto do in excel. Terry Excel Worksheet Functions 3 January 23rd 06 06:22 PM


All times are GMT +1. The time now is 01:49 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"