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.
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.