Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copying Range but Font not Copied..

Hi

I am using Excel 2007 and my code has run fine with previous versions of
Excel but I am now finding that the font is not properly "carried over" when
copying from one book to another - see final line of code below this
message.

Even when I copy the cells manually, the font is not copied. The font in the
original book is Calibri. The default font in the empty new sheet is Arial
and it remains so when the data is copied.

Any help gratefully received

Tim


sOrigWkBk = ActiveWorkbook.Name
Set oOrigSheet = ActiveWorkbook.ActiveSheet

Workbooks.Add (1)
Set oNewSheet = ActiveWorkbook.ActiveSheet

sNewWkBk = ActiveWorkbook.Name

With oNewSheet
Application.ActiveWindow.Zoom = iZoomFactor
oOrigSheet.Rows(iHeaderRow).Copy Destination:=.Range("A1")



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default Copying Range but Font not Copied..

Strange, possibly...

The destination workbook does not the Calibri fort installed.
or
There is other code that is formatting the destination row or copying to it.
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware




"Tim Childs"
wrote in message
...
Hi
I am using Excel 2007 and my code has run fine with previous versions of
Excel but I am now finding that the font is not properly "carried over" when
copying from one book to another - see final line of code below this
message.
Even when I copy the cells manually, the font is not copied. The font in the
original book is Calibri. The default font in the empty new sheet is Arial
and it remains so when the data is copied.
Any help gratefully received
Tim


sOrigWkBk = ActiveWorkbook.Name
Set oOrigSheet = ActiveWorkbook.ActiveSheet

Workbooks.Add (1)
Set oNewSheet = ActiveWorkbook.ActiveSheet

sNewWkBk = ActiveWorkbook.Name

With oNewSheet
Application.ActiveWindow.Zoom = iZoomFactor
oOrigSheet.Rows(iHeaderRow).Copy Destination:=.Range("A1")
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Copying Range but Font not Copied..

hi Jim

thanks for that - I'll test that out on th eoffending machine tomorrow

bw

Tim

"Jim Cone" wrote in message
...
Strange, possibly...

The destination workbook does not the Calibri fort installed.
or
There is other code that is formatting the destination row or copying to
it.
--
Jim Cone
Portland, Oregon USA
http://www.mediafire.com/PrimitiveSoftware




"Tim Childs"
wrote in message
...
Hi
I am using Excel 2007 and my code has run fine with previous versions of
Excel but I am now finding that the font is not properly "carried over"
when
copying from one book to another - see final line of code below this
message.
Even when I copy the cells manually, the font is not copied. The font in
the
original book is Calibri. The default font in the empty new sheet is Arial
and it remains so when the data is copied.
Any help gratefully received
Tim


sOrigWkBk = ActiveWorkbook.Name
Set oOrigSheet = ActiveWorkbook.ActiveSheet

Workbooks.Add (1)
Set oNewSheet = ActiveWorkbook.ActiveSheet

sNewWkBk = ActiveWorkbook.Name

With oNewSheet
Application.ActiveWindow.Zoom = iZoomFactor
oOrigSheet.Rows(iHeaderRow).Copy Destination:=.Range("A1")




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
How To Stop Excel Copying Named Functions When A Worksheet Is Copied? Wayne[_3_] Excel Worksheet Functions 2 February 19th 09 02:15 AM
Copying columns (but cells should be copied in different order)between two files or worksheets [email protected] Excel Programming 3 August 28th 08 02:04 PM
Problem copying from a hidden worksheet (data is copied, but alsoadditional sheet info) Susan Excel Programming 0 January 31st 08 03:35 PM
Color Font Turns Black When Copied and Pasted BMA Charts and Charting in Excel 2 November 27th 06 10:28 PM
When Copying a sheet, the whole workbook gets copied Rugby Al Excel Discussion (Misc queries) 1 January 5th 06 01:03 AM


All times are GMT +1. The time now is 06:22 AM.

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

About Us

"It's about Microsoft Excel"