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

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
Eh, not without seeing the code.:)
 
Upvote 0
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!
 
Upvote 0

Forum statistics

Threads
1,214,624
Messages
6,120,591
Members
448,973
Latest member
ksonnia

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