View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
John Keith[_2_] John Keith[_2_] is offline
external usenet poster
 
Posts: 175
Default Differences in the way a .xls file is opened

A.xls contains the macro code and the cell with the number of time to repeat
the paste.

B.xls is a template with 28 rows that I want to copy into a new worksheet.

C.xls is the new worksheet to receive the 1st 28 rows copy, then will be the
source for a copy (rows 1-28) and multiple pastes into the next set of 28...

The error is that the focus is not shifting to the C.xls workbook for the
last set of copies and pastes. What happens in error is workbook A's rows
1-28 are copied then pasted on down the rows of workbook A.

I will try the .count set up once I get home in a bit and respond with the
results.
(asuming that the home PC does the same thing. I have been mixing and
matching Excel 2000, 2002 and 2003.)

It seemed to work on 2000, but I didnt really test the style of opening in
2000. It was on excel2003 that I noticed the problem. The home PC has 2002
on it. I guess this is good testing though cause I do plan on having this
macro run on all of the above... maybe excel 98 too.

Hmm come to think of it, when the focus wasnt swapping... I dont think the
newblankws.xls was open at all. (wasn't on the windows list and only 1
instance of excel was running)


--
Regards,
John


"Datasort" wrote:

John,

I am having a problem understanding the source and destination of the copy
process. What is the error you receive when you try this? Have you tried to
see if both workbooks are open in the app. It might be that when you double
click on the file name then you are launching a new instance of Excel

In the imediate window try this command ... it should return 2 or more
?workbooks.Count

Can you then see both workbooks Workbook(1).name and workbook(2).name

Regards,

Stewart Rogers