Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 595
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,549
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 292
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with programming Excel User Forms [email protected] Excel Programming 4 August 8th 07 04:49 PM
ref or tutorial for user forms, listboxes br549 Excel Programming 2 May 23rd 07 01:14 PM
Programming a Forms scroll bar on Chart Sheet Chexpeare Excel Programming 1 January 8th 07 08:47 AM
Programming popup forms Richard Sherratt Excel Programming 2 December 8th 05 05:48 AM
Forms Toolbar Programming KB[_2_] Excel Programming 1 September 27th 03 06:21 PM


All times are GMT +1. The time now is 03:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"