Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Run-time error 1004: Too many different cell formats

I'm running Excel 2003. I have 2 workbooks that I'm trying to combine into
1. I've taken the macro from one and inserted it into the other workbook.
The macro opens up reports and copies all of the information (including
formatting) using:

Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
ActiveWindow.SmallScroll Down:=-45
etc.....

The macro makes it through 21 of 24 reports before giving the run-time
error. I've tried making sure the formatting in the existing sheets (not the
ones being copied) is all the same but nothing seems to help. The macro runs
fine in the workbook without other sheets in it. The sheets being copied are
all formatted the same.

Is there some code I can add to my macro to strip out any unused formatting?

I'm a vba/macro novice and will appreciate all help!

Thanks!

Randy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 213
Default Run-time error 1004: Too many different cell formats

Update: I've found a macro that will remove any unused number formatting but
what I really needs is a macro that will clean-up cell formatting.

Thanks again!

Randy

"Randy" wrote:

I'm running Excel 2003. I have 2 workbooks that I'm trying to combine into
1. I've taken the macro from one and inserted it into the other workbook.
The macro opens up reports and copies all of the information (including
formatting) using:

Range("A1").Select
Selection.PasteSpecial Paste:=xlPasteValuesAndNumberFormats
ActiveWindow.SmallScroll Down:=-45
etc.....

The macro makes it through 21 of 24 reports before giving the run-time
error. I've tried making sure the formatting in the existing sheets (not the
ones being copied) is all the same but nothing seems to help. The macro runs
fine in the workbook without other sheets in it. The sheets being copied are
all formatted the same.

Is there some code I can add to my macro to strip out any unused formatting?

I'm a vba/macro novice and will appreciate all help!

Thanks!

Randy

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
Run time error 1004, General ODBC error [email protected] New Users to Excel 0 September 19th 05 01:41 AM
run-time error '1004': Application-defined or object-deifined error [email protected] Excel Programming 5 August 10th 05 09:39 PM
Run time error '1004': Generaol ODBC error Dwaine Horton[_3_] Excel Programming 2 April 26th 05 02:52 PM
Run time error 1004 General ODCB Error Kevin Excel Programming 3 February 26th 05 12:51 PM
Application Run Time Error 1004 and Stack Error ExcelMonkey[_190_] Excel Programming 9 February 11th 05 04:48 PM


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