If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register or Login
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Excel sheets or MsflexGrid

Im trying to write a code, at the moment I have numbers being generated into 6 labels I then have a "save to history" cmd button with the idea that the captions of the labels are added onto a spreadsheet on the form. (either excell, msflexgrid or anyother it doesn't matter)

so I need to;
1. have a spread sheet ideally with 0 rows and 6 colums
2. when the "save to history" button is clicked....
----------- add a new row.
----------- display Lblnumber(1).caption in cell A1,Lblnumber(2).caption in cell b1,ect.
----------- save the sheet.

Idealy the spread sheet will be an object on the form rather than a seperate file.
Ive tried msflexgrid and found it easier to add rows change collum size, ect. but I cannot work out how to get the label captions onto it correctly (i managed to get 1 cell to display 1 label.caption but then couldn't add the others).

I havent got a clue with the excell sheet!

So please Help Im sure this is really easy stuff to anyone used to VB 6.0

Re: Excel sheets or MsflexGrid

To use an Excel sheet means to be restricted to computers which have Excel installed. Excel libraries are not redistributable.
The MSHFlexGrid, however, is. A program using FlexGrid can be installed on any other computer.

The cell's texts of a flexgrid are organized as a matrix in the TextMatrix property.
You must have at least one row to access this property.
Assumed your control is named 'flex' then you can do