saving data from Userform the spreadsheet VERY Slow.

weaselmcguff

Board Regular
Joined
Feb 24, 2006
Messages
246
I am saving data from VBA Userform to a spreadsheet. BUT it is very slow in saving.
VERY little data in the spreadsheet and from the userform.

When i hit save to make it go faster i click the mouse button and it goes 100x faster. What am i doing wrong?

Here is my save code:

Sheets("saved").Select ' targets the Sheets worksheet
Dim lrow As Integer
lrow = Sheets("saved").Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row 'new row to enter data into
With Sheets("saved")
.Cells(lrow, 1).Value = Date
.Cells(lrow, 2).Value = cb1
.Cells(lrow, 3).Value = lb1.Caption
.Cells(lrow, 4).Value = tb1
.Cells(lrow, 5).Value = tb2
.Cells(lrow, 6).Value = tb3
.Cells(lrow, 7).Value = tb4
.Cells(lrow, 8).Value = tb5
End With
ActiveWorkbook.save

Any help is greatly appreciated.
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
I don't see anything in that code that should cause that. Try copying your Userform into a new blank workbook and running this with all other Excel workbooks closed.
You can drag and drop code modules in the VB Editor's Project Explorer to copy them between workbooks.

If the code runs quickly in the new workbook, the problem could be with the environment of the existing workbook. You can find lots of threads on potential causes of slow workbooks.
 
Upvote 0
In addition to what Jerry suggested, my best guess would be that by clicking the mouse you are interrupting the recalculation of the workbook. Do you see 'Calculate' in the status bar?
 
Upvote 0
Then I guess one of your open workbooks is taking a long time to calculate.
 
Upvote 0
Going to have to do some checking and closing of other workbooks to see.

Thanks for the suggestions and Ideas on where to look.

MUCH appreciated
 
Upvote 0

Forum statistics

Threads
1,217,294
Messages
6,135,683
Members
449,957
Latest member
cjames12

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