Slow Code.. But NOT the Code itself

Kavy

Well-known Member
Joined
Jun 25, 2007
Messages
607
Hello, weird Question
I have a command on a user form in excel, and when I click it, it always takes a long time to run. When I hit crtl-Break, it is usually still only in my declaerations, or even still on the first line, not in my loops or anything else.

Anyone know what would be slowing this down?
 

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.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,343
Office Version
  1. 365
Platform
  1. Windows
Eh, not without seeing the code.:)
 

Kavy

Well-known Member
Joined
Jun 25, 2007
Messages
607
Heres My declarations, its not the code after because any time i pause it, its always is in the declarations

Anyone heard of this before?

<code>
Private Sub cmdSave_Click()
Dim i As Double
Dim data As String
Dim lastRow1 As Date
Dim lastRow2 As Date
Dim lastRow3 As Date
Dim flagg As Integer
Dim row As Double
Dim col As Double
Dim rowc As Double
Dim w As Double
Dim colc As Double
Dim r As Double
Dim c As Double
Dim box As Integer
Dim L As Double
Dim k As Double
Dim index2(300) As Double
Dim cell2(300, 300, 300) As Double

Dim dws As Worksheet
Dim dws1 As Worksheet
Dim dws2 As Worksheet
Dim dws3 As Worksheet
Dim wsc As Worksheet
Dim dat As Date
Dim res As Integer
Dim cell(300, 300, 300) As Double
Dim index(300) As Double
Set dws1 = Worksheets("Day sheet 1")
Set dws2 = Worksheets("Day sheet 2")
Set dws3 = Worksheets("Day sheet 3")
</code>

Thanks as always for any suggestions!
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,163,541
Messages
5,832,334
Members
430,128
Latest member
ojl987

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
Top