Vb Homework

Talk Electrician Forum

Help Support Talk Electrician Forum:

This site may earn a commission from merchant affiliate links, including eBay, Amazon, and others.

OnOff

Mad Inventor™
Supporting Member
Joined
Dec 25, 2011
Messages
5,456
Reaction score
69
My boy is stuck on his Visual Basic homework. He's done 2 out of the 3 assignments but this one seemingly has him stumped. I'm trying to help but my experience of programming started with a ZX81 and ended with MSBASIC many hears ago on DOS based machines. Doesn't help that he mainly communicates in grunts at the moment but I know he is struggling with this and he's usually pretty good. Said the teacher has given them the question 

A couple of questions if I may:

1) Can I learn VB on my pc that runs Ubuntu (Zorin)? Or something transferable?

2) If so then is VB "cross platform" as in is it something that could write in Ubuntu and transfer to a Wndows PC?

3) Any good WRITTEN guides? Can't stand YouTube.

Sorry for the numpty questions, it's been a long time!

The question if interested:

Create a program that will store the ingredients for a recipe.
 • The program should ask the user to input:
 • The number of people the recipe will serve
 • A list of ingredients: item, quantity and units for example flour, 150, grams
 
The program should store the recipe name, number of people and the list of ingredients with their quantities and units.
 
The user should be able to retrieve the recipe and have the ingredients recalculated for a different number of people.
 • The program should ask the user to input the number of people.
 • The program should output:
 • The recipe name
 • The new number of people
 • The revised quantities with units for this number of people.
 
Many thanks in advance!
 
What is he struggling with? Is there a specified data source. To be honest, random access files are probably easiest to get started with. But I would think database is specified. I used to do a fair bit of vb6. By the way, don't think you can do it in Linux unless run in some sort of vm, output is .exe only as far as I am aware and such only runs on Windows.

 
Thanks, I asked him the specific problem (via Skype.....well he is the other end of the house) and he came back with the mono-syllabic "IT!" as the problem. Bless!

I used to write simple programs in Basic all the time but it's funny how you forget! Commands keep popping into my head like IF, GOTO, RUN, LOAD. Typically I've ditched all the old 5 1/4" & 3.5" discs plus any books on it. Did have some hard copy print outs of old works I programs I did in the 80's..............but where???

 
So that is basically .net I've done a bit with that. It's an over complicated pain in the ass. I struggled with database integration other than an Access database. So I would probably choose file storage rather than database is that is an option.

I'm assuming they have done some work with the platform before?

 
Let me know if/when you need more help
Cheers. I ran your post #6 by him and just got an exasperated glare for trying to help! Mind you he was "mid game". I've just downloaded FREEBasic for Ubuntu so going to see if I can get to grips with that!

 
How old is your boy and has he done anything with VB Express before? Can he create a project? Add a data Source? Let me know what he can / cannot do and we'll go from there.

 
How old is your boy 15 and has he done anything with VB Express before? Yes

Can he create a project? Yes

Add a data Source? "Dunno what that is"

Let me know what he can / cannot do and we'll go from there.

Cheers
 
Last edited by a moderator:
Well, my boy has gotten somewhere with his homework. I sat up with him late last night trying to LEARN as much as help him! He has as I understand it (which is barely) he has created his Visual Basic project which stores data in an Excel file. He is having trouble making what's entered in the VB ListBox show up on the Excel Spreadsheet.

I think it's a case that he has a single ListBox with a number of items in. He can add items to this ListBox. 

He said something about one way being able to convert the ListBox first to an "array" then convert the array to Excel?

Means little to me other than makes my head hurt and me feel very old!

Does what he's trying to do make any sense from my numpty explanation?

Thanks

:lol:

 
Well, my boy has gotten somewhere with his homework. I sat up with him late last night trying to LEARN as much as help him! He has as I understand it (which is barely) he has created his Visual Basic project which stores data in an Excel file. He is having trouble making what's entered in the VB ListBox show up on the Excel Spreadsheet.

I think it's a case that he has a single ListBox with a number of items in. He can add items to this ListBox. 

He said something about one way being able to convert the ListBox first to an "array" then convert the array to Excel?

Means little to me other than makes my head hurt and me feel very old!

Does what he's trying to do make any sense from my numpty explanation?

Thanks

:lol:
I'm not being funny here mate, but a spreadsheet is probably the worst way to approach this. if you can write to a spreadsheet, you can write to a file.

 
I'm not being funny here mate, but a spreadsheet is probably the worst way to approach this. if you can write to a spreadsheet, you can write to a file.
As I understand it the Excel file gets created by VB? He wants to "put a VB list box into a single column in Excel"............

 

Latest posts

Top