Formatting problem copying sheet

G

Greg Lovern

I have a worksheet that if I copy to a new workbook, all is well. But
if I first create a new workbook and then copy this sheet into that
new worbook, the formatting is off -- the copied sheet is much wider
than the source.

I don't see any difference in the page setup properties. Any idea why
it's happening and what I can do about it?


Thanks,

Greg
 
G

GS

Greg Lovern presented the following explanation :
I have a worksheet that if I copy to a new workbook, all is well. But
if I first create a new workbook and then copy this sheet into that
new worbook, the formatting is off -- the copied sheet is much wider
than the source.

I don't see any difference in the page setup properties. Any idea why
it's happening and what I can do about it?


Thanks,

Greg

I suspect...
If you first create a new workbook the copied sheet's 'Normal' format
becomes the new workbook's 'Normal' format. If you copy a sheet to a
new workbook, its 'Normal' format becomes the new workbook's 'Normal'
format.
 
G

Greg Lovern

Greg Lovern presented the following explanation :



I suspect...
If you first create a new workbook the copied sheet's 'Normal' format
becomes the new workbook's 'Normal' format. If you copy a sheet to a
new workbook, its 'Normal' format becomes the new workbook's 'Normal'
format.

--
Garry

Free usenet access athttp://www.eternal-september.org
ClassicVB Users Regroup! comp.lang.basic.visual.misc

Thanks, the culprit was the Normal Style's font size.

FWIW, I found that to accurately get the source workbook's Style data,
that workbook had to be active. And, to set the target workbook's
Style data, that workbook had to be active. So now my code looks
like:

-- activate the source wb.
-- set variables to the source wb's Normal Style's font name and size.
-- activate the target wb.
-- set the target wb's Normal Style's font name and size.

Working fine now.

Greg
 
G

GS

Thanks, the culprit was the Normal Style's font size.

FWIW, I found that to accurately get the source workbook's Style data,
that workbook had to be active. And, to set the target workbook's
Style data, that workbook had to be active. So now my code looks
like:

-- activate the source wb.
-- set variables to the source wb's Normal Style's font name and size.
-- activate the target wb.
-- set the target wb's Normal Style's font name and size.

Working fine now.

Greg

Glad you got it resolved! Thanks for the feedback...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top