Bloat file size

SIGE

Board Regular
Joined
Oct 6, 2010
Messages
88
Hello,

I have a workbook in which I have a bit of code ... a couple userforms, a couple modules.

Which is 90kb in size.
On 1 of the sheets i hide "all" columns and "all" rows ... well, A1:Z100 remains visible.
after saving the file, it becomes 2890 kb ... I tried this several times now, with always the same result.

any suggestions?

Sige
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
Don't hide them? :)
Which version of Excel - on 2003 hiding makes almost no difference at all for me (40 vs 42 KB)
 
Upvote 0
Same here...

I did as you said and my filesize went from 40kb to 43kb. I am also using excel 2003.

So maybe thats because of the version, or because of something else you are doing in your workbook?
 
Upvote 0
Did the same thing with 2010 as an xlsm (no actual code) and it went from 8KB to 8KB.
 
Upvote 0
Hi,
I m using Excel 2007.

With a blank workbook it does not make a difference... it goes from 8kb to 9kb.

but with my specific wb... is 2900 kb a little bit much.:mad:

Sige
 
Upvote 0
Did you just hide the rows and columns or did you also run code in between?
 
Upvote 0
just hiding the cols and rows. Save the sheet with a pwd.
Then closing the wb which fires a sheet hiding procedure.
That's all i did.

:confused:
 
Upvote 0
So not just hiding rows then!
Encrypting it will increase file size; I don't know what your code may do additionally.
 
Upvote 0
Voila my _BeforeClose sub ... I do not see a lot of "violence" in it.
Or?


Private Sub Workbook_BeforeClose(Cancel As Boolean)

'Clear Current Session's User Name
With UserAdministration
.Unprotect pword
.Cells.Locked = False
.Range("A3") = ""
.Cells.Locked = True
.Protect pword
End With

'hide all sheets except warning sheet
For Each WS In ThisWorkbook.Sheets
If WS.Name = wsWarningSheet Then


WS.Visible = True

Else
WS.Visible = xlVeryHidden
End If
Next
'record opening in remote cell
With EnableMacrosPlease
.Unprotect "splashpassword"
With Sheets(wsWarningSheet).Cells(Rows.Count, Columns.Count)
.Value = .Value + 1
End With
.Protect "splashpassword"
End With

Call ToggleScreen(True)

End Sub
 
Upvote 0
I suspect this bit:
Code:
With UserAdministration
 .Unprotect pword
 .Cells.Locked = False
 .Range("A3") = ""
 .Cells.Locked = True
 .Protect pword
 End With
since you explicitly format every cell on the sheet - and I can't see why?
 
Upvote 0

Forum statistics

Threads
1,224,612
Messages
6,179,887
Members
452,948
Latest member
Dupuhini

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top