Why does my spreadsheet take so long to load ...?

chazrab

Well-known Member
Joined
Oct 21, 2006
Messages
911
Office Version
  1. 365
Platform
  1. Windows
First of all, Happy Holidays to all - I just got a new tablet - 32 bit O/S, 2 GB RAM, Win 8.1 and plenty enough storage for just a few apps. My spreadsheet file is 139 MB(doesn't seem that big to me), and it takes a full 60 seconds or more to fully load and appear on the screen. Why would this be ? I can offer this: I have about 90 userforms, and about 100 sheets. When the file first opens, the following code finds the correct column in(down) the sheet:
Code:
Sub INTVAL()
Application.EnableEvents = False
Application.ScreenUpdating = False
Dim ca, b, h, v, w, s, z As Currency, d, begdate As Date, x, y As Long, colrng As Range
d = Date
begdate = Range("startdate").Value
x = (Date - begdate) / 7
y = Int(x)
    If (x - y) >= 0.5 Then
         colnum = Int(x) + 1
    Else
         colnum = Int(x)
    End If
If colnum > 1 Then
   Worksheets("BUDGET").Cells(2, colnum).Select
    With Selection.Interior
        .Pattern = xlSolid
        .PatternColorIndex = xlAutomatic
        .Color = 9167871
        .TintAndShade = 0
        .PatternTintAndShade = 0
    End With
Application.EnableEvents = True
Application.ScreenUpdating = True

End If
End Sub
This INTVAL macro runs when the sheet is activated - could this calculation be what's bogging it down ? or is it the number of sheets and userforms all with underlying code ? or something else ?

Thx for anyone's suggestions.
cr
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
With so many sheets etc. the potential for calculations to be happening is High, you can try adding

Application.Calculation = xlCalculationManual at the top and

Application.Calculation = xlCalculationAutomatic at the end.

This might help some
 
Upvote 0

Forum statistics

Threads
1,222,573
Messages
6,166,844
Members
452,079
Latest member
Frimpage

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