Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Any chance you are using Access 97?
Apparently the created Excel file is not Excel97 and needs to be saved first as 97 before it will behave the way you expect. -----Original Message----- 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 . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2007 Macro/VB Question DDE Question | Excel Worksheet Functions | |||
where can I see my question and answer? Yesterday I ask a question | Excel Discussion (Misc queries) | |||
Another Question | Excel Worksheet Functions | |||
Newbie Question - Subtraction Formula Question | Excel Discussion (Misc queries) | |||
The question is an excel question that I need to figure out howto do in excel. | Excel Worksheet Functions |