tusharm
Did you mean this error message:When the code crashes, what are the values of the various variables used in the line
Run-time error '-2147417848 (80010108)':
Method 'Copy' of object 'Range' failed
Apurk45
This is a discussion on Daring challenge for XL2002 (XP) Gurus within the Excel Questions forums, part of the Question Forums category; Originally Posted by kpuls Hi Apurk, Try just taking the first "." away from ".[B7:B35]" It worked on my version ...
Unfortunately, that changes what the code does/is supposed to do.Originally Posted by kpuls
Tushar Mehta (Microsoft MVP Excel 2000-present)
Excel & PowerPoint tutorials and add-ins; custom productivity solutions for MS Office
tusharm
Did you mean this error message:When the code crashes, what are the values of the various variables used in the line
Run-time error '-2147417848 (80010108)':
Method 'Copy' of object 'Range' failed
Apurk45
Apurk,
Actually, I've just realized that my suggestion will not work. I neglected to notice that the line I mentioned was in the middle of a with statement.
Looks like the bottle of wine is still alive...
Out of curiosity, is there any reason you can't blow away the merged cells and just use regular? They are the source of your problem, no question about it.
Cheers!
Ken Puls, CMA, MS MVP (Excel)
There is nothing I hate more than when my computer does what I tell it to, and not what I want it to...
Ken's Excel Website -||- Ken's Excel Forums
This is a scheduling program - so I use merge cell as a visual indicator of a block of time assign to an appointment.
But funny thing is that I have deleted all the merged cells AND STILL having the same problem in Excel XP but NOT in Excel 2000. Go figure
As I said at the beginning of this thread this is only XL xp problem. The some code work just fine in XL 2000 with MERGED CELLS.
Here is the basic idea what I am trying to do:
******** ******************** ************************************************************************>
Microsoft Excel - Book1 ___Running: xl2002 XP : OS = Windows XP
(F)ile (E)dit (V)iew (I)nsert (O)ptions (T)ools (D)ata (W)indow (H)elp (A)bout
A B C D 3 * Monday* Tuesday Wednsday 4 8:00*AM * * * 5 8:30*AM Dr*Jackson * * 6 9:00*AM * * 7 9:30*AM * * 8 10:00*AM * * 9 10:30*AM * * * 10 11:00*AM * * * 11 11:30*AM * * *
Sheet1 *
[HtmlMaker 2.42] To see the formula in the cells just click on the cells hyperlink or click the Name box
PLEASE DO NOT QUOTE THIS TABLE IMAGE ON SAME PAGE! OTHEWISE, ERROR OF JavaScript OCCUR.
Hmmm, running in XP this works fine for me.
See this:
http://www.utteraccess.com/forums/sh...b=5&o=&fpart=2
What's the issue with copying? Is your paste area sized correctly? I merge [a1:a5] and both of the following works:
[a1:a5].Copy [b2] 'Shifts a meged area to a merged area
[a1].copy [b2] 'Shifts merged contents to a sinlge cell
You might want to just offset to a single cell as your destination. If you want the count for whatever ever, try:
MsgBox [a1].MergeArea.Rows.Count
General response to your inquiry, perhaps of use though.
I was thinking about this a bit today. I'm not sure if this is what Nate was driving at in the other post linked above or not, or even if it would work, but...
You have the target for the pasting generated from the lines that bombs. Does it work if you first unmerge the target cells via code, then copy and paste the desired data there?
What I mean is:
Range("B1:B5").unmerge 'or whatever the correct syntax is
Range("A1:A5").copy
Range("B1").paste
I only had a minute to play, so couldn't work out the exact syntax, but thought I'd share my thought. Maybe useless, but maybe it'll help.
Cheers,
Ken Puls, CMA, MS MVP (Excel)
There is nothing I hate more than when my computer does what I tell it to, and not what I want it to...
Ken's Excel Website -||- Ken's Excel Forums
kpuls
I tried your idea but could not come up with correct code to: (so gave up)
1. Unmerge all merged cells in 15 source w/s's
2. Copy ALL cells from 15 source w/s's to 1 destination w/s
3. Merge cells (in 15 source w/s & in destination w/s) the same way as they were in the source w/s. (before step#1 "Unmerge")
But if you know how to do it I will give a try.
Funny thing is that my code and as a matter of fact my whole project works fine with and without merged cells when I run it in Excel2000 - but when I try to run it using Excel XP my code hangs up and my w/b freezes. Unfortunately this project MUST be able run in Excel XP.
Apurk45
Hi:
I am new at this stuff but I tried your code in excel 2002 and got the following resuts:
code stopped at "Call Reborder"
debugging in the immediated VBE window produces:
[auto_open] <
[SetupFunctionIDs] <
[SetupFunctionIDs] >
[PickPlatform] <
[PickPlatform] >
[VerifyOpen] <
[VerifyOpen] > 1
[RegisterFunctionIDs] <
[RegisterFunctionIDs] >
[auto_open] >
looks like the code is calling for something not defined??
Sorry I am not much help...
plettieri
plettieri
I have no clue wehat this all means. I have never used this before.
Hi:
I was trying to respond to:Tushar Mehta
"You can find them by selecting 'Debug' in the dialog box that XL shows with the error message and then selecting (in the VBE) View | Locals Window"
What this means, I don't kmow either.
plettieri
_________________
Bookmarks