Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default 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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default 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


Reply
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
Insert Object Problem Raj Excel Discussion (Misc queries) 1 April 20th 10 05:18 PM
insert row problem WYN Excel Discussion (Misc queries) 3 June 30th 05 05:46 AM
Insert\Name\Apply.... problem David Excel Worksheet Functions 6 February 25th 05 12:49 PM
Insert Code Problem pwz Excel Programming 2 July 7th 04 05:49 AM
copy insert problem saziz[_10_] Excel Programming 4 June 25th 04 01:50 AM


All times are GMT +1. The time now is 10:23 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"