Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Excel crash on pasting as values

Hi,

I have a Excel 97-2003 workbook. And on one of the sheets there is a Table
inserted from Data-Table which does some interest calculation.

When this workbook is opened in Excel 2007 following code is run Excel
crashes.

Whereas in Excel 97 I get "Method PasteSpecial of object Range failed" error
for the first time. If I stop and re-run the code formulas for the table are
removed.

Code:
Cells.Select

Selection.Copy

Selection.PasteSpecial xlValues

Cells(1, 1).Select

Does anybody have any idea about this.

Pls. let me know if you want to have a look at the workbook.

Thanks in advance.

-Anand
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Excel crash on pasting as values

Excel 97-2003 has 64k rows by 256 columns while Excel 2007 has 1M rows by 16k
columns.
Cells.Select selects entire worksheet (which is different in 97-2003 format
and 2007 format) so my suspicion is about that.

Try to use different selection method

Vlado

"Anand Nichkaode" wrote:

Hi,

I have a Excel 97-2003 workbook. And on one of the sheets there is a Table
inserted from Data-Table which does some interest calculation.

When this workbook is opened in Excel 2007 following code is run Excel
crashes.

Whereas in Excel 97 I get "Method PasteSpecial of object Range failed" error
for the first time. If I stop and re-run the code formulas for the table are
removed.

Code:
Cells.Select

Selection.Copy

Selection.PasteSpecial xlValues

Cells(1, 1).Select

Does anybody have any idea about this.

Pls. let me know if you want to have a look at the workbook.

Thanks in advance.

-Anand

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Excel crash on pasting as values

Thx for a quick reply.

My problem is that I don't know where in the sheet user has put any formula.
So I select everything and try to paste as values.

Also why does it throws error first time and works perfectly next time in
Excel 97.

One more observation, in Excel 97 although it works perfectly second time
Excel crashes when tried to close with Out of Memory error.

-Thx
Anand

"Vlado Sveda" wrote:

Excel 97-2003 has 64k rows by 256 columns while Excel 2007 has 1M rows by 16k
columns.
Cells.Select selects entire worksheet (which is different in 97-2003 format
and 2007 format) so my suspicion is about that.

Try to use different selection method

Vlado

"Anand Nichkaode" wrote:

Hi,

I have a Excel 97-2003 workbook. And on one of the sheets there is a Table
inserted from Data-Table which does some interest calculation.

When this workbook is opened in Excel 2007 following code is run Excel
crashes.

Whereas in Excel 97 I get "Method PasteSpecial of object Range failed" error
for the first time. If I stop and re-run the code formulas for the table are
removed.

Code:
Cells.Select

Selection.Copy

Selection.PasteSpecial xlValues

Cells(1, 1).Select

Does anybody have any idea about this.

Pls. let me know if you want to have a look at the workbook.

Thanks in advance.

-Anand

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Excel crash on pasting as values

if you've copy/pasted such a lot of data, you're gobbling memory. This isn't
efficiently released by excel - and is only released when you close the app.

Instead, try exporting the sheet as a CSV file and import that into
2007...after all, its the data, not the formulae you need


"Anand Nichkaode" wrote:

Thx for a quick reply.

My problem is that I don't know where in the sheet user has put any formula.
So I select everything and try to paste as values.

Also why does it throws error first time and works perfectly next time in
Excel 97.

One more observation, in Excel 97 although it works perfectly second time
Excel crashes when tried to close with Out of Memory error.

-Thx
Anand

"Vlado Sveda" wrote:

Excel 97-2003 has 64k rows by 256 columns while Excel 2007 has 1M rows by 16k
columns.
Cells.Select selects entire worksheet (which is different in 97-2003 format
and 2007 format) so my suspicion is about that.

Try to use different selection method

Vlado

"Anand Nichkaode" wrote:

Hi,

I have a Excel 97-2003 workbook. And on one of the sheets there is a Table
inserted from Data-Table which does some interest calculation.

When this workbook is opened in Excel 2007 following code is run Excel
crashes.

Whereas in Excel 97 I get "Method PasteSpecial of object Range failed" error
for the first time. If I stop and re-run the code formulas for the table are
removed.

Code:
Cells.Select

Selection.Copy

Selection.PasteSpecial xlValues

Cells(1, 1).Select

Does anybody have any idea about this.

Pls. let me know if you want to have a look at the workbook.

Thanks in advance.

-Anand

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Excel crash on pasting as values

Hi,

As I have said earlier my workbook is a 97-2003 format so it would have only
64K rows.
And when I don't have this table on the sheet it works fine, but crashes
when there is this table.

Also the table is made up of 10R X 2C. And 90% cells on the sheet are empty.

Do you still think that memory management is an issue here?

-Thx
Anand

"Patrick Molloy" wrote:

if you've copy/pasted such a lot of data, you're gobbling memory. This isn't
efficiently released by excel - and is only released when you close the app.

Instead, try exporting the sheet as a CSV file and import that into
2007...after all, its the data, not the formulae you need


"Anand Nichkaode" wrote:

Thx for a quick reply.

My problem is that I don't know where in the sheet user has put any formula.
So I select everything and try to paste as values.

Also why does it throws error first time and works perfectly next time in
Excel 97.

One more observation, in Excel 97 although it works perfectly second time
Excel crashes when tried to close with Out of Memory error.

-Thx
Anand

"Vlado Sveda" wrote:

Excel 97-2003 has 64k rows by 256 columns while Excel 2007 has 1M rows by 16k
columns.
Cells.Select selects entire worksheet (which is different in 97-2003 format
and 2007 format) so my suspicion is about that.

Try to use different selection method

Vlado

"Anand Nichkaode" wrote:

Hi,

I have a Excel 97-2003 workbook. And on one of the sheets there is a Table
inserted from Data-Table which does some interest calculation.

When this workbook is opened in Excel 2007 following code is run Excel
crashes.

Whereas in Excel 97 I get "Method PasteSpecial of object Range failed" error
for the first time. If I stop and re-run the code formulas for the table are
removed.

Code:
Cells.Select

Selection.Copy

Selection.PasteSpecial xlValues

Cells(1, 1).Select

Does anybody have any idea about this.

Pls. let me know if you want to have a look at the workbook.

Thanks in advance.

-Anand



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default Excel crash on pasting as values

I changed my code to following but still Excel crashes.

Range("A1:L9").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False
Range("D4").Select

The table is located at 1,1 cell on the sheet.

This code is recorded with "Record Macro" option.

-Thx
Anand
"Anand Nichkaode" wrote:

Hi,

As I have said earlier my workbook is a 97-2003 format so it would have only
64K rows.
And when I don't have this table on the sheet it works fine, but crashes
when there is this table.

Also the table is made up of 10R X 2C. And 90% cells on the sheet are empty.

Do you still think that memory management is an issue here?

-Thx
Anand

"Patrick Molloy" wrote:

if you've copy/pasted such a lot of data, you're gobbling memory. This isn't
efficiently released by excel - and is only released when you close the app.

Instead, try exporting the sheet as a CSV file and import that into
2007...after all, its the data, not the formulae you need


"Anand Nichkaode" wrote:

Thx for a quick reply.

My problem is that I don't know where in the sheet user has put any formula.
So I select everything and try to paste as values.

Also why does it throws error first time and works perfectly next time in
Excel 97.

One more observation, in Excel 97 although it works perfectly second time
Excel crashes when tried to close with Out of Memory error.

-Thx
Anand

"Vlado Sveda" wrote:

Excel 97-2003 has 64k rows by 256 columns while Excel 2007 has 1M rows by 16k
columns.
Cells.Select selects entire worksheet (which is different in 97-2003 format
and 2007 format) so my suspicion is about that.

Try to use different selection method

Vlado

"Anand Nichkaode" wrote:

Hi,

I have a Excel 97-2003 workbook. And on one of the sheets there is a Table
inserted from Data-Table which does some interest calculation.

When this workbook is opened in Excel 2007 following code is run Excel
crashes.

Whereas in Excel 97 I get "Method PasteSpecial of object Range failed" error
for the first time. If I stop and re-run the code formulas for the table are
removed.

Code:
Cells.Select

Selection.Copy

Selection.PasteSpecial xlValues

Cells(1, 1).Select

Does anybody have any idea about this.

Pls. let me know if you want to have a look at the workbook.

Thanks in advance.

-Anand

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
Excel Pasting Values and not Formula David Adamson Excel Discussion (Misc queries) 0 January 15th 09 11:15 PM
Excel is pasting values, not formulas by default Kirstin Excel Discussion (Misc queries) 3 July 4th 08 02:23 AM
Excel clipboard should allow pasting of formulae not just values Desperate Don Excel Discussion (Misc queries) 0 April 28th 05 05:54 PM
Pasting values from a closed Excel instance Jan Kronsell[_3_] Excel Programming 3 April 27th 05 07:12 AM


All times are GMT +1. The time now is 09:23 PM.

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

About Us

"It's about Microsoft Excel"