473,324 Members | 2,246 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,324 software developers and data experts.

entering data into a listbox?

I am new to this and the book doesn't explain how to enter data from the user's input box into a listbox, the information is then to be calculated when you get all five grades into the listbox. For some reason I can't get the info to go into the listbox. Can anyone help me?
Dec 4 '07 #1
3 5727
lee123
556 512MB
Hi there arizona, are you going to be adding these things in code? does you form have just a listbox and a button? because if it has these things you might want to try this:

example:

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command1_Click()
  2.  
  3.     Dim command1 As String
  4.     command1 = inputbox("AddItem")
  5.     List1.AddItem "What ever you want to add"
  6.     List1.AddItem "What ever you want to add"
  7.     'and so on
  8.  
  9. End Sub
lee123
Dec 5 '07 #2
lee123
556 512MB
im sorry this will only add the items as soon as you run the program not with the inputbox. maybe someone else can modify it to use the inputbox. sorry

lee123
Dec 5 '07 #3
debasisdas
8,127 Expert 4TB
You are using inputbox or textbox for user input ?
If using inputbox then try this sample code

Expand|Select|Wrap|Line Numbers
  1. private sub command1_click()
  2. dim s1 as string,s2 as string, s3 as sting
  3. list1.clear
  4. s1=inputbox("enter grade1")
  5. list1.additem s1
  6. s2=inputbox("enter grade2")
  7. list1.additem s2
  8. s3=inputbox("enter grade3")
  9. list1.additem s3
  10. end sub
Dec 6 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: me | last post by:
I've included a picture below to show what I am trying to accomplish. It is best to copy/paste into notepad to get the spacing correct. I have a dataset that contains 3 tables. Two of the tables...
2
by: mike | last post by:
Hi All I have a listbox which has a table as its row source. I want to be able to choose from this listbox (which has approximately 8 records) and have this value entered into another table (it...
3
by: Uma sakshi | last post by:
Hi I have one VB.NET application,in that application i have one datagrid control.The datagrid control contains somedata.I want to copy the data in a particular cell and paste it into my C#.NET...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
0
by: | last post by:
Greets All, Question on data in datagrid /listbox and looping? I’m trying to decide the best way to write this code. 1 would like the user to make several selections from one listbox/combo box...
1
by: A. Spiehler | last post by:
I'm trying to fill a listBox control with string members from an array of objects. I think using data binding is supposed to be the easiest way to do this. I've never used data binding before and...
2
by: DartmanX | last post by:
I have a form that does the following: - User inputs a serial number - VBA code does a lookup (SQL Query) and populates a listbox with results (4 columns in the Listbox) - Start Over (Listbox...
4
by: CrimeMaster | last post by:
HI I have an Exe file when it runs ,there are just two controls on the window.One is a ListBox and another is a Multi line Rich Edit control.When i click on an item in the list some text is...
15
by: Doogie | last post by:
I have a .net app that a user currently enters a number in a text box, hits a button and a data call is executed. She wants the ability to enter in multiple numbers (up to 100). So to make...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.