ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   List box data (https://www.excelbanter.com/excel-programming/291641-list-box-data.html)

mike

List box data
 
I noticed that when you placed a listbox on wrksht you
can use a data list for your ListFIllRange. But when you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60 rows
long?? Did i miss another way somewhere?? any help thanks!



Greg Koppel

List box data
 
Use the RowSource property, enter the range that contains your list..

HTH, Greg

"mike" wrote in message
...
I noticed that when you placed a listbox on wrksht you
can use a data list for your ListFIllRange. But when you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60 rows
long?? Did i miss another way somewhere?? any help thanks!





Tom Ogilvy

List box data
 
In the userform it is called RowSource. The actual property is provided by
the container - (oleObject on worksheet, control on userform) thus a
difference. So look for the RowSource propert and set it to
Sheet1!A1:B20

for example.

--
Regards,
Tom Oglivy

"mike" wrote in message
...
I noticed that when you placed a listbox on wrksht you
can use a data list for your ListFIllRange. But when you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60 rows
long?? Did i miss another way somewhere?? any help thanks!





mike

List box data
 
Thank You!! both...( sigh) fingers are tired
today....brain is fried.
-----Original Message-----
In the userform it is called RowSource. The actual

property is provided by
the container - (oleObject on worksheet, control on

userform) thus a
difference. So look for the RowSource propert and set

it to
Sheet1!A1:B20

for example.

--
Regards,
Tom Oglivy

"mike" wrote in

message
...
I noticed that when you placed a listbox on wrksht you
can use a data list for your ListFIllRange. But when

you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a

ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60 rows
long?? Did i miss another way somewhere?? any help

thanks!




.


mike

List box data
 
Okay , another question... you know how you can (once you
have highligted in the list of the list box?? you can
just type the frst letter of your choice and it goes to
it?? how do i modify code to where you can repeat that
letter key tillyou get thru a list of "t" 's tillyour
choice comes up?




-----Original Message-----
In the userform it is called RowSource. The actual

property is provided by
the container - (oleObject on worksheet, control on

userform) thus a
difference. So look for the RowSource propert and set

it to
Sheet1!A1:B20

for example.

--
Regards,
Tom Oglivy

"mike" wrote in

message
...
I noticed that when you placed a listbox on wrksht you
can use a data list for your ListFIllRange. But when

you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a

ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60 rows
long?? Did i miss another way somewhere?? any help

thanks!




.


Tom Ogilvy

List box data
 
From help on the matchentry property of the combobox/listbox


constant: fmMatchEntryFirstLetter

value: 0

Explanation:
Basic matching. The control searches for the next entry that starts with the
character entered. Repeatedly typing the same letter cycles through all
entries beginning with that letter.

Please see the help on this however for a fuller explanation and other
considerations.

--

Regards,
Tom Ogilvy


"mike" wrote in message
...
Okay , another question... you know how you can (once you
have highligted in the list of the list box?? you can
just type the frst letter of your choice and it goes to
it?? how do i modify code to where you can repeat that
letter key tillyou get thru a list of "t" 's tillyour
choice comes up?




-----Original Message-----
In the userform it is called RowSource. The actual

property is provided by
the container - (oleObject on worksheet, control on

userform) thus a
difference. So look for the RowSource propert and set

it to
Sheet1!A1:B20

for example.

--
Regards,
Tom Oglivy

"mike" wrote in

message
...
I noticed that when you placed a listbox on wrksht you
can use a data list for your ListFIllRange. But when

you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a

ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60 rows
long?? Did i miss another way somewhere?? any help

thanks!




.




mike

List box data
 
tom , silly me , i found once i have studied each
property in the property box of the control. However..I
have one more for the day....Once i have created the
form..How do I launch the form? what module do i oput the
the show code in? I would liek the form to show up when
that workbook is opened and then closed when it is
closed. is it possible to attach the formto a icon on the
worksheet and let it be clicked to show the form??
-----Original Message-----
From help on the matchentry property of the

combobox/listbox


constant: fmMatchEntryFirstLetter

value: 0

Explanation:
Basic matching. The control searches for the next entry

that starts with the
character entered. Repeatedly typing the same letter

cycles through all
entries beginning with that letter.

Please see the help on this however for a fuller

explanation and other
considerations.

--

Regards,
Tom Ogilvy


"mike" wrote in

message
...
Okay , another question... you know how you can (once

you
have highligted in the list of the list box?? you can
just type the frst letter of your choice and it goes to
it?? how do i modify code to where you can repeat that
letter key tillyou get thru a list of "t" 's tillyour
choice comes up?




-----Original Message-----
In the userform it is called RowSource. The actual

property is provided by
the container - (oleObject on worksheet, control on

userform) thus a
difference. So look for the RowSource propert and set

it to
Sheet1!A1:B20

for example.

--
Regards,
Tom Oglivy

"mike" wrote in

message
...
I noticed that when you placed a listbox on wrksht

you
can use a data list for your ListFIllRange. But when

you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a

ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60

rows
long?? Did i miss another way somewhere?? any help

thanks!




.



.


Tom Ogilvy

List box data
 
if you want it displayed when the workbook is opened, then use the
workbook_Open event. Also see the BeforeClose Event

see Chip Pearson's page on Events

http://www.cpearson.com/excel/events.htm

for a button from the forms toolbar, create a macro in a standard module

Sub Btn_Click()
userform1.show
End Sub

then assign it to your button.

if you mean on a toolbar, then do tools=customize, then create a new
toolbar or add a button to an existing toolbar and assign your macro
(btn_click) to that.

If you just want to run the macro, then run btn_click

If from a commandbar button on the worksheet, drag the button onto the
worksheet and double click on it. In the resulting procedure, put in code
like

Private Sub Commandbutton1_Click()
userform1.show
End Sub



--
Regards,
Tom Ogilvy

"mike" wrote in message
...
tom , silly me , i found once i have studied each
property in the property box of the control. However..I
have one more for the day....Once i have created the
form..How do I launch the form? what module do i oput the
the show code in? I would liek the form to show up when
that workbook is opened and then closed when it is
closed. is it possible to attach the formto a icon on the
worksheet and let it be clicked to show the form??
-----Original Message-----
From help on the matchentry property of the

combobox/listbox


constant: fmMatchEntryFirstLetter

value: 0

Explanation:
Basic matching. The control searches for the next entry

that starts with the
character entered. Repeatedly typing the same letter

cycles through all
entries beginning with that letter.

Please see the help on this however for a fuller

explanation and other
considerations.

--

Regards,
Tom Ogilvy


"mike" wrote in

message
...
Okay , another question... you know how you can (once

you
have highligted in the list of the list box?? you can
just type the frst letter of your choice and it goes to
it?? how do i modify code to where you can repeat that
letter key tillyou get thru a list of "t" 's tillyour
choice comes up?




-----Original Message-----
In the userform it is called RowSource. The actual
property is provided by
the container - (oleObject on worksheet, control on
userform) thus a
difference. So look for the RowSource propert and set
it to
Sheet1!A1:B20

for example.

--
Regards,
Tom Oglivy

"mike" wrote in
message
...
I noticed that when you placed a listbox on wrksht

you
can use a data list for your ListFIllRange. But when
you
want a listbox on a userform...there isnt a
ListFillRange. Does this mena i will have to do a
ADDITEM
on a initialize procdure b4 it opens? Can i attached
alist or reference one?? My data list is about 60

rows
long?? Did i miss another way somewhere?? any help
thanks!




.



.





All times are GMT +1. The time now is 02:49 PM.

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