View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bill Manville Bill Manville is offline
external usenet poster
 
Posts: 473
Default textbox selection to relative row?

Caa wrote:
textbox.rowsource = "a3:a150"

I would like to have this a little more flexible as i have 3 sheets i
want to use it on and don't know what the 5th row from the bottom will
end up in each sheet. i have seen the xlup statement but cannot figure
it out.


A bit confused as a TextBox doesn't have a RowSource.
Do you mean a ListBox?

If so, try
MyListBox.RowSource = Range(Cells(3,"A"), _
Cells(Rows.Count,"A").End(xlUp)).Address

Bill Manville
MVP - Microsoft Excel, Oxford, England
No email replies please - reply in newsgroup