Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Refrence to Listbox in form


Hello, Im trying to populate a ListBox placed on form. I prefer to use
OLEObject, however I can manage to get reference to Listboxes. It works
fine when the Listbox is located in a sheet.

Set wrkSheet = ThisWorkbook.Sheets("Input")
Set OleObj = wrkSheet.OLEObjects("myListBox")

works fine, but this dosent

Set OleObj = myForm.OLEObjects("myListBox")

I basicly I want to fill the listbox and be able to count which option
that has been selected by the user.

Kind regards :)


--
rash
------------------------------------------------------------------------
rash's Profile: http://www.excelforum.com/member.php...o&userid=29765
View this thread: http://www.excelforum.com/showthread...hreadid=499776

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Refrence to Listbox in form


Anyone? Need help on this one.


--
rash
------------------------------------------------------------------------
rash's Profile: http://www.excelforum.com/member.php...o&userid=29765
View this thread: http://www.excelforum.com/showthread...hreadid=499776

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Refrence to Listbox in form

Dim myLB As msforms.ListBox
Set myLB = myform.Controls("MyListbox")



rash wrote:

Hello, Im trying to populate a ListBox placed on form. I prefer to use
OLEObject, however I can manage to get reference to Listboxes. It works
fine when the Listbox is located in a sheet.

Set wrkSheet = ThisWorkbook.Sheets("Input")
Set OleObj = wrkSheet.OLEObjects("myListBox")

works fine, but this dosent

Set OleObj = myForm.OLEObjects("myListBox")

I basicly I want to fill the listbox and be able to count which option
that has been selected by the user.

Kind regards :)

--
rash
------------------------------------------------------------------------
rash's Profile: http://www.excelforum.com/member.php...o&userid=29765
View this thread: http://www.excelforum.com/showthread...hreadid=499776


--

Dave Peterson
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
listbox value to a form alexanderd[_11_] Excel Programming 1 July 17th 05 04:24 PM
vb6 form with listbox RB Smissaert Excel Programming 2 June 2nd 05 11:23 PM
listbox option in form inquirer Excel Programming 2 April 7th 04 02:16 AM
User form with a listbox John Green[_2_] Excel Programming 4 December 30th 03 07:18 PM
Listbox/Form question Stuart[_5_] Excel Programming 1 August 24th 03 04:53 PM


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

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"