Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
hi,
i was wondering if it is possible to enter details into a visual basic project, and then later access that same data in a spreadsheet document.. to be specific what i mean is..
can i enter exam marks in vb..
get a final grade from those exam marks and view it in vb..
and then click on a cmdbutton to see the exam marks and final grade in spreadsheet..
is it possible??
ok thanx..

Why bother. If all the processing is being done in VB why not display the data in a Grid Control. Make your own mini spreadsheet in fact. Not that difficult with one of the two Grid controls supplied with VB.
Alternatively you could export the data in a comma delimited text file and import the file into Excel.
Or you could use the Excel COM Object and manipulate Excel from within VB. But that getting a bit complicated if you have not used COM object before.
Stuart

hmm, no i havent used COM object.
So with a grid control i will be able to display the data.. frm this will i be able to create a graph/chart?
i mean, for the final exam grades that i will have, i want to be able to view this in a line graph or something, will i be able to do this? can i code it so that the graph appears automatically with the data in it when i click on button?
is it possible?
thanx for ur help so far stuart :)

Yes everything you need is possible from within VB.
Use the grid control to display the data. MS Flex Grid is probably the easier. The Data bound Grid control is not a flexible. You can then use the MS Chart control to display a graph.
With a click of a button you can alternate between a Grid representation of the data to a Graphical one.
I do this all the time with Stock Market application I wrote. It list the stocks in a grid showing daily closing price, rise/fall, percentage rise/fall and daily minimum and maximum. A click on a menu and it display the same information in a Graph including moving averages and the like.
Have a go at it and get back if you get stuck. Just one tip though. Put the Grid control on one form and the Graph control on another. Populate the Grid control first with the data. Then use the data in the Grid to draw the Graph. Makes it easier when switching between the two.
Stuart

There is a VB editor in Excel that uses VBX, if that helps. I'm kind of confused here as to what you are saying.

okay thank you guys for your help..
i will be sure to come here for more help if i need it.. thanks again..
take care :)

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |