ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Why my cell format is not copied when I copied workbook? (https://www.excelbanter.com/excel-programming/287320-why-my-cell-format-not-copied-when-i-copied-workbook.html)

courtesio99[_28_]

Why my cell format is not copied when I copied workbook?
 
I copied one workbook to another workbook using the following code..

Sub Test()

Dim Nwb As Workbook
Dim i As Integer

Application.ScreenUpdating = False
Sheets(Array("alpha", "bravo", "charlie", "delta")).Copy

Set Nwb = ActiveWorkbook

Nwb.Sheets.Select
Cells.Select
Selection.Interior.ColorIndex = xlNone

Application.ScreenUpdating = True

End Sub

But why is it that the some of my customised cell format in my original
workbook does not get copied over to the new workbook.
The cell format that does not get copied is such:
#,##0_);[Red](#,##0)

This means that a negative number will be shown in red and in brackets.
Though negative numbers in the new workbook are shown in red, they are
not shown in brackets. Anyone care to enlighten me on this?


---
Message posted from http://www.ExcelForum.com/



All times are GMT +1. The time now is 04:16 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com