I have just made up a spreadsheet to record holidays etc for 2005. I posted a question last week regarding conditional formatting on 7 different parameters and got great responses which did exactly what I wanted.
The spreadsheet is now exactly how I wanted it to be, but despite containing only 1 worksheet, is now 12.5mb in size.
As a result it takes a while to open off the server it's stored on. Is there a way to reduce the size of this file ? Have I done something wrong that is making the file so large ?
I expected the file size to be a few hundred kb at the most.
Here is the statement from the VBE window in case theres something in there making the file so large.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
For Each oCell In Target
Select Case oCell.Value
Case Is = "P"
oCell.Interior.ColorIndex = 5
oCell.Font.ColorIndex = 2
Case Is = "H"
oCell.Interior.ColorIndex = 3
oCell.Font.ColorIndex = 2
Case Is = "F"
oCell.Interior.ColorIndex = 50
oCell.Font.ColorIndex = 2
Case Is = "S"
oCell.Interior.ColorIndex = 6
Case Is = "T"
oCell.Interior.ColorIndex = 37
Case Is = "C"
oCell.Interior.ColorIndex = 26
Case Is = "O"
oCell.Interior.ColorIndex = 38
Case Else
oCell.Interior.ColorIndex = xlNone
End Select
Next oCell
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
Thanks for reading, hope you can help,
Cheers,
Jock
The spreadsheet is now exactly how I wanted it to be, but despite containing only 1 worksheet, is now 12.5mb in size.
As a result it takes a while to open off the server it's stored on. Is there a way to reduce the size of this file ? Have I done something wrong that is making the file so large ?
I expected the file size to be a few hundred kb at the most.
Here is the statement from the VBE window in case theres something in there making the file so large.
Private Sub Worksheet_Change(ByVal Target As Range)
Dim oCell As Range
For Each oCell In Target
Select Case oCell.Value
Case Is = "P"
oCell.Interior.ColorIndex = 5
oCell.Font.ColorIndex = 2
Case Is = "H"
oCell.Interior.ColorIndex = 3
oCell.Font.ColorIndex = 2
Case Is = "F"
oCell.Interior.ColorIndex = 50
oCell.Font.ColorIndex = 2
Case Is = "S"
oCell.Interior.ColorIndex = 6
Case Is = "T"
oCell.Interior.ColorIndex = 37
Case Is = "C"
oCell.Interior.ColorIndex = 26
Case Is = "O"
oCell.Interior.ColorIndex = 38
Case Else
oCell.Interior.ColorIndex = xlNone
End Select
Next oCell
End Sub
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
End Sub
Thanks for reading, hope you can help,
Cheers,
Jock