Input data via user form.


Posted by tee on July 16, 2001 11:40 PM

Hi Everyone - can I call upon someone for help again.

I have code to enter data from a userform to the spreadsheet but it is slow. It copies the info to a range of cells and then copies it to the spreadsheet.
Like so.
Sheets("Formula").Select
Range("A1:T1").Select
Selection.Copy
Sheets("DB").Select
Range("A1").Select
Selection.End(xlDown).Select
Selection.Offset(1, 0).Range("A1:T1").Select
Selection.Insert Shift:=xlDown
Application.CutCopyMode = False
Many thanks in advance

Tee.

Posted by Ivan F Moala on July 17, 2001 1:56 AM

Tee
Try;

Dim Lr As Double

Lr = Sheets("DB").Range("A1").End(xlDown).Row

Sheets("Formula").Range("A1:T1").Copy Destination:=Sheets("DB").Range("A" & Lr + 1)


Ivan



Posted by tee on July 17, 2001 3:29 PM

Re: Now Increase Named Range


Ivan

Thanks, this is great but how do I increase the Named Range, when I add a new record say in row A6
my named range remains as A5.

Tee

Ivan