Hi all,
I've created some coding to create a number of worksheets, to then move each sheet to its own workbook and save the file in a specific location. It works fine but for one small annoying problem.
There's a cell that contains a number format which is present as the file is saved; it formats the number to -£0.00 when I re-open the file the format is changed to £(0.00).
The code I'm using is as follows -
Can anyone suggest what's causing this and how I can remedy it please?
Thanks in advance!
Jon
I've created some coding to create a number of worksheets, to then move each sheet to its own workbook and save the file in a specific location. It works fine but for one small annoying problem.
There's a cell that contains a number format which is present as the file is saved; it formats the number to -£0.00 when I re-open the file the format is changed to £(0.00).
The code I'm using is as follows -
Code:
Sheets("XYZ").Select
Sheets("XYZ").Copy After:=Sheets(4)
Sheets("XYZ").Select
Range("A5").Select
Selection.Copy
Sheets("XYZ").Select
Range("J30").Select
Selection.PasteSpecial Paste:=xlPasteValues
Range("J21").Select
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues
ActiveSheet.Name = ActiveSheet.Range("J21").Value
ActiveSheet.Select
Cells.Select
Range("H1").Activate
Selection.Copy
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("H19").Select
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
Selection.Copy
Application.CutCopyMode = False
ActiveSheet.Move
With ActiveWorkbook
.SaveAs Filename:="C:\XYZ\XYZ\XYZ\XYZ\XYZ\XYZ" & "\" & .Sheets(1).Name & ".xlsx"
.Close savechanges:=False
End With
Can anyone suggest what's causing this and how I can remedy it please?
Thanks in advance!
Jon