Selecting and copying to a dynamic ending range

S

Skip Bisconer

I have a ten column spreadsheet where the last two columns are for user
input. in the next to last column I need to create a combobox in row 2 with a
rowsource (named range) located in Sheet2 on then I need to copy that
combobox from row three down to the last row that has data in directly to the
copy columns adjacent column. This is my code so far and my problem is at the
end of the code just before the paste method. I20 must have the row number of
that last row of data. I don't know how to phrase that in VBA Thanks for any
help you may give me.

With Selection.Validation
.Delete
.Add Type:=xlValidateList, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=GLExpense"
.IgnoreBlank = True
.InCellDropdown = True
.InputTitle = ""
.ErrorTitle = ""
.InputMessage = ""
.ErrorMessage = ""
.ShowInput = True
.ShowError = True
End With
Selection.Copy
Range("I3").Select
Range(Selection, ActiveCell.SpecialCells(xlLastCell)).Select
Range("I3:I20").Select
ActiveSheet.Paste
Skip
Using Office 2003 Pro
2007 Student version
 
Top