LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Minitman
 
Posts: n/a
Default Long Time Delay To Paste From UserForm To Sheet

Greetings,

I have a UserForm with 41TextBoxes on it. I am using the Offset
method to transfer the value of each box to the last row of the column
that the data belongs in. I then clear cells with only 0's in them.
And last I sort the sheet. This is taking about a minute each cycle
and getting longer.

Here is the code that I use:

Set ExtWB2 = Workbooks("1993-12.xls")
Set ExtWS2 = ExtWB2.Worksheets("Customers")

ExtWS2.Activate

With Range("A65536").End(xlUp).Offset(1, 0)
.Value = CB1.Text
.Offset(0, 2).Value = TB2.Value
.Offset(0, 3).Value = TB3.Value
<snip 4 - 40
.Offset(0, 41).Value = TB41.Value
End With

Cells.Select
'This looks for cells with only one 0 in them and clears them
Cells.Replace What:="0", Replacement:="", LookAt:=xlWhole, _
SearchOrder:=xlByRows, MatchCase:=False, SearchFormat _
:=False, ReplaceFormat:=False
'This sorts the sheet by the A column
Selection.Sort Key1:=Range("A2"), Order1:=xlAscending, Header _
:=xlYes, OrderCustom:=1, MatchCase:=False, Orientation _
:=xlTopToBottom, DataOption1:=xlSortNormal, DataOption2 _
:=xlSortNormal, DataOption3:=xlSortNormal
Range("A1").Select

It is taking a minute to cycle one name. I have about 600 to do and
that is going to take a LONG time to finish.

Anyone have any ideas as to how to increase the speed of this sub?

TIA

-Minitman
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
time sheet calculations emmcee Excel Worksheet Functions 7 August 20th 05 12:26 PM
more than 3 conditions in conditional formatting - possible? rob curtis Excel Discussion (Misc queries) 11 August 17th 05 04:02 PM
Time Sheet Function HRMSN Excel Worksheet Functions 3 August 11th 05 06:28 PM
UserForm and combo box to another sheet Nigel Excel Discussion (Misc queries) 0 April 29th 05 09:41 AM
vba to sort group copy paste to another sheet mango Excel Worksheet Functions 0 November 5th 04 04:27 AM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"