How Do I Get Data Out of A ListBox?

I'm using a built in userform listbox with multiselect.

I named it lbx1

but I can't access it from the VB Editor.

I tried things like lbx1.value, lbx1.text
but lbx1 doesn't seem to exist in VB editor.  I'm sure it's a simple
mistake.   Someone please help me.


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

0
11/3/2003 5:45:46 AM
excel.misc 78881 articles. 5 followers. Follow

2 Replies
429 Views

Similar Articles

[PageSpeed] 41

please


------------------------------------------------
~~ Message posted from http://www.ExcelTip.com/
~~View and post usenet messages directly from http://www.ExcelForum.com/

0
11/3/2003 12:10:37 PM
Ken,

Let's check some stuff.

When in the forms window (double-click this UserForm in the Project Explorer
pane), Do you see the listbox on the form?

When you select it, what name do you see in the properties window?

If you right-click your UserForm entry in the Project Explorer and do View
Code, then open the Object dropdown (upper left), is it listed there?

-- 
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"kenji4861" <kenji4861.wazxb@excelforum-nospam.com> wrote in message
news:kenji4861.wazxb@excelforum-nospam.com...
>
> I'm using a built in userform listbox with multiselect.
>
> I named it lbx1
>
> but I can't access it from the VB Editor.
>
> I tried things like lbx1.value, lbx1.text
> but lbx1 doesn't seem to exist in VB editor.  I'm sure it's a simple
> mistake.   Someone please help me.
>
>
> ------------------------------------------------
> ~~ Message posted from http://www.ExcelTip.com/
> ~~View and post usenet messages directly from http://www.ExcelForum.com/
>


0
nowhere8060 (363)
11/3/2003 2:14:39 PM
Reply:

Similar Artilces:

Dashboards and Source Data
Hello, I created a dashboard with several small graphs on it. The data for the graphs is stored on a separate data sheet (i.e., work sheet). I now want to duplicate the dashboard/data sheets to build a dashboard for another employee. I envision the workbook eventually having 5 dashboards driven off 5 data sheets. The trick I'm looking for is a way to change the datasource for the graphs on the copied datasheet to the appropriate corresponding data sheet. I know how to do it manually but it seems like there should be some sort of "find and replace" type f...

How to force data to be put in entry
When anther row (line) is added to a worksheet I want to be made sure within the row a certain column is filled in before saving is done. How do I create that? Thx, Jac Hi Jac You can use this event in the Thisworkbook module to check if all cells in the C column in Sheet1 have a value If not you can't save the file See also this event Private Sub Workbook_BeforeClose(Cancel As Boolean) End Sub Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) RC = Sheets("Sheet1").UsedRange.Rows.Count If Application.WorksheetFunction.CountA _ ...

Data Validation Help Needed urgently !!!!!!!!!!!
I am trying to write a data validation in VBA. I know I have the code right but I can't get it to work. It works fine if the validation was done dirctly in excel but I get an error when I try the same thing in VBA. Below is a snippet of the code I am having a problem with. The problem seem to be with the " Formula1:=" line. I have been scratching my head for the past 24hrs now trying to figure this out and I am still not coming up with anything. Any help will be greatly appreciated. Range("B3:C3").Select With Selection.Validation .Delete .Add Type...

US Data File in UK Money
If I have Money data in a US-verion (2004) data file, and then buy the latest UK version will I be able to open my old US-version data file in it? If not, will the data export and import from one to the other as I don't want to have to re-input hundreds of items. Thanks In microsoft.public.money, "Keith" <@.> wrote: >If I have Money data in a US-verion (2004) data file, and then buy the >latest UK version will I be able to open my old US-version data file in it? > >If not, will the data export and import from one to the other as I don't >want t...

Excel ODBC driver created table/inserted data lost on application
Using native ODBC API I connect to an Excel spreadsheet using Microsoft Excel Driver (*.xls) 4.00.6305.00 successfully and I am able to create a new table and insert data into the new table and retrieve the inserted new data successfully. While my application is running I can disconnect and reconnect to the Excel data source and see the new table and its data. However, when my application exit the new table and inserted data are lost and the spreadsheet is never updated. Is there a special ODBC command to close/save an Excel worksheet? OK. I found out the cause of this is...

Getting photos to print in an image field
This is Access 2007. In my report I have an image field (9 x 6.77 cm). It exists in the detail section of a subreport and snakes across then down. The onPrint event for that section reads: Me.imgPhoto.Picture = Forms!frmProfiles!txtPath & "\" & Me.txtPhoto My problem is that Access doesn't print all the photos. I suspect it's a size issue as if I reduce the resolution of the photos to, say, 800 x 600, then they all print. However, the resaulting print quality is not nearly as good as the original resolution So: is there a way to force Access to be patient and ensur...

Excel: Ignoring Specific data in a column
I have Excel data (raw) that I am importing into an Excel sheet which has my formulas). I am trying to add up a column of numbers, but some of the fields have the letter's "N/A" Presently I am using formula =sum(A10:A15000), but it is not working due to the "N/A". How can I get Excel to ignore the "N/A" and just add the cell's that do have the numbers. For reference, the numbers do have decimal points (xx.xx) Thanks, -Avi If the N/A are just text, then select the column and use find/replace to make them all zeros. If the N/A are the result of fu...

HOW DO I ENTER DATA WHEN I SEEM TO BE STUCK IN A SUMMATION FORMULA
WHEN I OPEN MY SIMPLE SPREAD SHEET AND ATTEMPT TO FILL ONE CELL I AM STUCK THERE AND AS I TRY TO MOVE AROUND I GET THE BLUE SHADING AS IF I WERE DOING A SUMMATION. I CAN'T GET RID OF THE SHADING OR GET IT TO ENTER DATA? -- K J PETERSON hi typing with all caps is considered to be shouting and therefore impolite. press the F8 key once and see what happens. Regards FSt1 "kenneth j peterson" wrote: > WHEN I OPEN MY SIMPLE SPREAD SHEET AND ATTEMPT TO FILL ONE CELL I AM STUCK > THERE AND AS I TRY TO MOVE AROUND I GET THE BLUE SHADING AS IF I WERE DOING A > SUMMATION....

How to get the size of an icon?
Hi: I need insert an ActiveX conctrol in the CRichEditCtrl. code: ------------------------------------------------------- REOBJECT reobject; ... SIZEL sizel; sizel.cx = the ActiveX conctrol'width; sizel.cy = the ActiveX conctrol'height; reobject.sizel = sizel; m_richedit.GetIRichEditOle()->InsertObject(&reobject); ------------------------------------------------------- The ActiveX conctrol can display an icon.It'width is the icon'width. Question: How to get the size of an icon? Thanks! Use ::GetIconInfo ...

getting players records vs. other players
Hi I am having trouble doing this. Here is what i have. I have a table that shows the date, winner, and loser. I then have 2 queries that counts the number of times Player A won vs. Player B, and then how many times Player A lost to Player B. I then combine thsoe 2 queries and it works fine provided Player A and Player B have at least 1 win and loss vs each other. If not, nothing shows up when i combine the queries So what I need is for it to show that Player A is 4-0 vs Player B and subsequently Player B is 0-4 vs Player A. Can someone help? example Player Team Won Oppon...

Macro to delete specific data in tables
Hi: I am an analyst working in service quality for a market research firm. We use SPSS 12 to output the data and later copy paste the tables into Excel for formatting and printing. The problem I currently have is that I got a large group of output tables which come in two different formats. The first table is like this: Satisfacción Expectativas Mean Std Deviation Masculino 5,4 1,4 Femenino 3,8 2,2 Group Total 5,3 1,5 Menos de 2400 UF 5,9 ,9 2401 a 25 mil UF 5,6 1,2 25.001 a 100 mil UF 5,0 1,6 Más de 100.001 UF ...

Exporting data #2
This is a multi-part message in MIME format. ------=_NextPart_000_0025_01C74E15.274520B0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Is it possible to export from a Money account into a format that Excel = can read? I have used Excel extensively but do not know what to do with = the qif extension that Money exports. It could be that I just don't know = how to import the data in Excel. Thanks --=20 Dan Johnson ------=_NextPart_000_0025_01C74E15.274520B0 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-E...

Search/Extract Data w/in Text File
Hello again! I am searching within a text file for the last row within the file. After I locate the row I need to separate the data and place into multiple cells on my worksheet. The code I have is as follows: Dim TextPath As String Dim DelimSrchChar As String Dim METtime As String Dim DataBuffer As Variant Dim NCData As Variant Dim DelimPos As Integer '=============================================== DelimSrchChar = "," TextPath = "C:\Temp\Formatted_NC_SN1008.txt" Open TextPath For Input As #1 'open text file for SN1008 Do While Not EOF(1) ...

Omit data based on criteria in reports
I have a report which gives an employee's productivity rating, based on a set standard. This standard depends on what product the employee is running at the time. However, some times the employees run products that do not have standards associated with them (trial products for instance). A daily report tells: Employee Product How much was produced How much was expected (standard) % Expected (How much was produced/How much was expected) When a trial product is run on a given day, the % Expected number is Null (=IIf([How much was expected] = 0, Nul...

Getting contents of a cell when cell reference is in the sheet
If I have a cell reference in a cell, how could I get the contents of the cell instead of the cell reference again. For example, A B C D 1 2 5 3 'A2' 4 How could I see the contents of cell A2 using the information in cell C3. I'm matching one number with another in different worksheets and want to get a value from the same row as the match. I can get it to return the address of the data I want to get, but can't get the data. Incorporate INDIRECT()... i.e. =INDIRECT(A2) will return the contents of A2. -- Regards, Dave "A Nelso...

Getting e-mails
Prior to 2007 I would simply export e-mail messages, contact etc to a .PST file or simply copy that file over. But I think it different starting with Outlook 2007, but I using Outlook 2010. What do I need to do to transfer over the e-mails? I also came across a program called Mail Store home. What is the best way to do this? Best method there is: http://www.howto-outlook.com/howto/backupandrestore.htm You should bookmark this website. It's excellent and will answer most, if not all, of your Outlook questions. -- Kathleen Orland "klafert" <klafert...

Get lis your blogs with our Blog directory http://www.blogsnexus.com
http://www.blogsnexus.com ...

How can I get vacant lines in a sheet to not print
In Lotus 123 the following formula @IF((F25+H25)=0,"|--","") in the first cell of each row in a print range would place the pipe symbol in that cell. Any rows with the symbol would not print when the range was printed. This is very helpful when you don't need to print rows that do not contain data. Such as inventory items with no qunatities. How can I get Excel to do the same thing. Some of my spread sheets may have hundreds of rows but I only need to print those with data. Sorting first is not an option. look at autofilter in Help. "Luapremrub" ...

How do I get numbers on a colum to stay as I typed them on an exc.
I created a workbook with information to be used for merging to a letter. I created a heading colum to read "HOURS" and entered the numbers as 1:23. When I merged the files, the information showed at 1:23:00 A.M. How do I correct this on my workbook excel file or on the Word document? I do not want the numbers to be changed to time. Please help!!!!!! There's an article on the Microsoft web site that might help you: Answer Box: Numbers don't merge right in Word http://office.microsoft.com/en-ca/assistance/HA011164951033.aspx Desperate School Secretary...

Trying begin VBA template project, get error "macros disabled"?
I am beginning a project to code and update a Word template using VBA. When I try to run the form given to me I get error "The macros in this project are disabled?" Any suggestions? Thank you. Save the template in your templates folder, which is a trusted location. -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP, originally posted via msnews.microsoft.com "The Applicant" <The Applicant@discussions.microsoft.com> wrote in message news:D2E642C...

Recover data from a corrupted spreadsheet
any suggestions for recovering data from a secured spreadsheet/ password protected? The hard drive had a corrupted FAT table, I have recovered the files and I can extract data from non-secured spreadsheets but I cannot extract data from any secured spreadsheets. The data appear encrypted. How do I enter a password if I am not prompted for one when attempting to open the spreadsheet? Any suggestions or use of additional third party tools would be appreciated. -- als Maybe OpenOffice would be worth a try: (http://www.openoffice.org, a 60-65 meg download or a CD) I've never used it, b...

vba excel 2007 data mining
hi, i tried recording a macro to do an analysis using excel 2007 data mining addin. But later when i try to run the macro it did not work. I checked the macro code - it did not seem have any code to call the data mining algorithm in the data mining addin. Please help ...

How do I sort data in column B to align with data in column A?
Im fairly green to Excel but what I am after is I want to be able to sort a range of codes in Column B to basically move and realign to the same row as the data that is in Colmn A eg Start Column A Column B R F G B B H H R F G Finish Column A Column B R R G G B B H H F F Piece a cake. Delete columm B, then copy column A and paste into Column B "Jephri1" wrote: > Im fairly green to Excel but what I am after is I...

Multi-Select Listbox
I want to run a report using a multi-select listbox. The selected items would be the only ones that would come up on the report. Also it would be grouped on these selected item! Any direction is appreited. Thanks DS Here is a function I use for exactly that purpose. Private Function BuildWhereCondition(strControl As String) As String 'Set up the WhereCondition Argument for the reports Dim varItem As Variant Dim strWhere As String Dim ctl As Control Set ctl = Me.Controls(strControl) Select Case ctl.ItemsSelected.Count Case 0 'Include All strW...

lost data....lost person! #3
I'll try to keep it simple....I have Windows XP Home Edition...and The Office 2000 suite....I was useing the Excel 2000 program and forgot to save the data, however, I DID NOT close the program. The data I had put in was gone when I went back to do some more entries and save and close the workbook. When I tried undo in the edit menu it said that I Couldn't undo and only after switching from sheet to sheet did it finally show that I could do one undo but it was on a seperate sheet than the one that I had showing when the option was available and I believe that it was informat...