![]() |
Insert Row Problem
Hi,
I am automating Excel using VB6 and I am having a problem inserting a row (copying row) that contains a simple formula (Sum of two columns). The inserts is working fine except it is not bringing over the formula. Any ideas (see code below)? wbExcel.Sheets(3).Rows(51).Insert or Set wr = wbExcel.Sheets(3).Range(A51).EntireRow() Call wr.Insert(, False) Thanks |
Insert Row Problem
Thanks,
Your code inserts a new blank row above row 51. What was row 51 becomes row 52. Row 52 will contain the formulas. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "george" wrote in message Hi, I am automating Excel using VB6 and I am having a problem inserting a row (copying row) that contains a simple formula (Sum of two columns). The inserts is working fine except it is not bringing over the formula. Any ideas (see code below)? wbExcel.Sheets(3).Rows(51).Insert or Set wr = wbExcel.Sheets(3).Range(A51).EntireRow() Call wr.Insert(, False) Thanks |
Insert Row Problem
How do I copy row 51 and insert that row above it.
Thanks "Jim Cone" wrote in message ... Thanks, Your code inserts a new blank row above row 51. What was row 51 becomes row 52. Row 52 will contain the formulas. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "george" wrote in message Hi, I am automating Excel using VB6 and I am having a problem inserting a row (copying row) that contains a simple formula (Sum of two columns). The inserts is working fine except it is not bringing over the formula. Any ideas (see code below)? wbExcel.Sheets(3).Rows(51).Insert or Set wr = wbExcel.Sheets(3).Range(A51).EntireRow() Call wr.Insert(, False) Thanks |
Insert Row Problem
Thanks,
wbExcel.Sheets(3).Rows("15").Copy wbExcel.Sheets(3).Rows("15").Insert Shift:=xlDown ApplicationObjectVariable.CutCopyMode = False ' adjust -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "george" wrote in message... How do I copy row 51 and insert that row above it. Thanks "Jim Cone" wrote in message ... Thanks, Your code inserts a new blank row above row 51. What was row 51 becomes row 52. Row 52 will contain the formulas. -- Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "george" wrote in message Hi, I am automating Excel using VB6 and I am having a problem inserting a row (copying row) that contains a simple formula (Sum of two columns). The inserts is working fine except it is not bringing over the formula. Any ideas (see code below)? wbExcel.Sheets(3).Rows(51).Insert or Set wr = wbExcel.Sheets(3).Range(A51).EntireRow() Call wr.Insert(, False) Thanks |
Insert Row Problem
In addition...
The xlDown constant should also be qualified with the ApplicationObjectVariable. Jim Cone "Jim Cone" wrote in message... Thanks, wbExcel.Sheets(3).Rows("15").Copy wbExcel.Sheets(3).Rows("15").Insert Shift:=xlDown ApplicationObjectVariable.CutCopyMode = False ' adjust Jim Cone San Francisco, USA http://www.realezsites.com/bus/primitivesoftware "george" wrote in message... How do I copy row 51 and insert that row above it. Thanks |
All times are GMT +1. The time now is 07:16 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com