Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX
controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. Thanks in advance . . . Rich |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
On Thu, 12 Feb 2009 12:04:03 -0800, Rich W.
wrote: I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. I don't know of a decent reference. In the VBE, press F2 to bring up the object browser. Right click and select "Show Hidden Members". Then search for ListBox and you can review the properties and methods. Sheet1.Listboxes(1).ListFillRange = "$A$1:$A$10" Sheet1.Listboxes(1).LinkedCell = "$C$5" -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
Rich,
I don't use Apple computers, so be advised... You are looking the ".AddFormControl" method for a shape. Also, ".TextFrame.Characters.Text" = "Attractive Name" will put a caption on the shape, if it allows captions. -- Jim Cone Portland, Oregon USA "Rich W." wrote in message I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. Thanks in advance . . . Rich |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
I have problems with the old Forms Toolbar controls and have to research
every time I work with one in VBA. I usually just set them up manually then limit my VBA to using them, and even that is sometimes bothersome.If you find a good reference somewhere, post back and let us all know. "Rich W." wrote: I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. Thanks in advance . . . Rich |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
You may get more useful responses if you're more specific with what you want to
do with those listboxes? Retrieve values from them??? You'll need code if you allow multiple selections. But you can use a linkedcell if you only allow a single item to be selected. As a developer/user, I think most of the listboxes that I've used don't have code applied to them. But I'll have a button (also from the forms toolbar) that will process the choices made in the listbox. (I'm afraid that if I have code assigned to the _click event, then I (the user) will click on the wrong item.) You could search the microsoft newsgroups looking for "as listbox" (with the quotes). I'm sure that you'll find lots of sample code where posters have declared as variable as a listbox. Rich W. wrote: I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. Thanks in advance . . . Rich -- Dave Peterson |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
I've kept a copy of my Excel 5 help file, it's named VBA_XL.HLP and dated
1994. It is of tremendous help (ok I know, help files are supposed to be) when programming for Forms controls and Excel5 dialogs. I can't find a download location with google right now, but it's got to be out there somewhere. Best wishes Harald "Rich W." skrev i melding ... I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. Thanks in advance . . . Rich |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
Harald,
Isn't using a help file cheating? <g -- Jim Cone Portland, Oregon USA "Harald Staff" wrote in message I've kept a copy of my Excel 5 help file, it's named VBA_XL.HLP and dated 1994. It is of tremendous help (ok I know, help files are supposed to be) when programming for Forms controls and Excel5 dialogs. I can't find a download location with google right now, but it's got to be out there somewhere. Best wishes Harald |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
LOL.
CHM files and MSDN is cheating. Ancient HLP from way back just adds a touch of class. They won't even run on Vista without additional software. Best wishes Harald "Jim Cone" skrev i melding ... Harald, Isn't using a help file cheating? <g -- Jim Cone Portland, Oregon USA "Harald Staff" wrote in message I've kept a copy of my Excel 5 help file, it's named VBA_XL.HLP and dated 1994. It is of tremendous help (ok I know, help files are supposed to be) when programming for Forms controls and Excel5 dialogs. I can't find a download location with google right now, but it's got to be out there somewhere. Best wishes Harald |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
Thanks Dick . . . I didn't know about "Show Hidden" . . . your reply was worth it just for that!. Rich "Dick Kusleika" wrote: On Thu, 12 Feb 2009 12:04:03 -0800, Rich W. wrote: I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. I don't know of a decent reference. In the VBE, press F2 to bring up the object browser. Right click and select "Show Hidden Members". Then search for ListBox and you can review the properties and methods. Sheet1.Listboxes(1).ListFillRange = "$A$1:$A$10" Sheet1.Listboxes(1).LinkedCell = "$C$5" -- Dick Kusleika Microsoft MVP-Excel http://www.dailydoseofexcel.com |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
Programming for Listboxes in Forms
Thanks Harald . . .
I did a search on google and couldn't find it (Maybe I wasn't patient enough!) . . . but we did have an old copy laying around. . . . Thanks again, Rich "Harald Staff" wrote: I've kept a copy of my Excel 5 help file, it's named VBA_XL.HLP and dated 1994. It is of tremendous help (ok I know, help files are supposed to be) when programming for Forms controls and Excel5 dialogs. I can't find a download location with google right now, but it's got to be out there somewhere. Best wishes Harald "Rich W." skrev i melding ... I need to use a Listbox Control from the Forms toolbar. (I cannot use ActiveX controls due to the fact this spreadsheet needs to work on Macs.) I'm fairly new to VBA, but I can manage ActiveX controls. My problem is how to program for a ListBox form control. I haven't been able to find examples and/or references for working with these controls. Can anyone point me to a decent reference? (Help hasn't been help - but then maybe I'm not using the right vocab.) Ugh. Thanks in advance . . . Rich |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Help with programming Excel User Forms | Excel Programming | |||
ref or tutorial for user forms, listboxes | Excel Programming | |||
Programming a Forms scroll bar on Chart Sheet | Excel Programming | |||
Programming popup forms | Excel Programming | |||
Forms Toolbar Programming | Excel Programming |