ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   user form - data range (https://www.excelbanter.com/excel-programming/357279-user-form-data-range.html)

sam1[_3_]

user form - data range
 

Hi,

Instead of coding every possible AddItem for a List box, how do i set
it on the user form to cover a range of data on a separate worksheet?


--
sam1
------------------------------------------------------------------------
sam1's Profile: http://www.excelforum.com/member.php...o&userid=18280
View this thread: http://www.excelforum.com/showthread...hreadid=526857


Bob Phillips[_6_]

user form - data range
 
Me.ListBox1.RowSource = Worksheets("Sheet1").Range("A1:A10").Address

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"sam1" wrote in message
...

Hi,

Instead of coding every possible AddItem for a List box, how do i set
it on the user form to cover a range of data on a separate worksheet?


--
sam1
------------------------------------------------------------------------
sam1's Profile:

http://www.excelforum.com/member.php...o&userid=18280
View this thread: http://www.excelforum.com/showthread...hreadid=526857




Tom Ogilvy

user form - data range
 
If it is on a separate worksheet as stated, it requires a bit more

Me.ListBox1.RowSource =
Worksheets("Sheet1").Range("A1:A10").Address(Exter nal:=True)

--
Regards,
Tom Ogilvy


"Bob Phillips" wrote:

Me.ListBox1.RowSource = Worksheets("Sheet1").Range("A1:A10").Address

--

HTH

Bob Phillips

(remove nothere from the email address if mailing direct)

"sam1" wrote in message
...

Hi,

Instead of coding every possible AddItem for a List box, how do i set
it on the user form to cover a range of data on a separate worksheet?


--
sam1
------------------------------------------------------------------------
sam1's Profile:

http://www.excelforum.com/member.php...o&userid=18280
View this thread: http://www.excelforum.com/showthread...hreadid=526857





sam1[_4_]

user form - data range
 

Thanks for info, I'm tring to put Times in the combo box but when i
select time values, they convert to numbers in the combobox, how do i
keep the Time format?


--
sam1
------------------------------------------------------------------------
sam1's Profile: http://www.excelforum.com/member.php...o&userid=18280
View this thread: http://www.excelforum.com/showthread...hreadid=526857


Tom Ogilvy

user form - data range
 
Private Sub Combobox1_Click()
Combobox1.Value = format(Combobox1.Value,"hh:mm:ss")
End sub

--
Regards,
Tom Ogilvy


"sam1" wrote in message
...

Thanks for info, I'm tring to put Times in the combo box but when i
select time values, they convert to numbers in the combobox, how do i
keep the Time format?


--
sam1
------------------------------------------------------------------------
sam1's Profile:

http://www.excelforum.com/member.php...o&userid=18280
View this thread: http://www.excelforum.com/showthread...hreadid=526857





All times are GMT +1. The time now is 05:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com