Previous in Forum: About ModBus   Next in Forum: Software Operation
Close
Close
Close
2 comments
Rate Comments: Nested
Power-User

Join Date: Jun 2007
Location: Oxford, UK
Posts: 145
Good Answers: 3

Saving Data in MsFlexgrid (VB6)

10/27/2010 5:56 AM

I am being a bit lazy here and after posting this question will try and seek the answer.

I have a form with 7 tabs (SSTab) and on each tab there is a MsFlexgrid consisting of 27 rows of 32 colums. This is a timesheet listing names and time from 08:00 to 10:00.

I want to be able to save this data and then reload when the program starts.

My initial thought is

Pseudocode:

for tab = 0 to 6
for row = 0 to 26
for column =1 to 31
save data

followed by the respective Nexts.

I am looking to see if there is an alternative to this like

for i = 0 to 6
Save MsFlexgrid array(i)
Next

Your comments and guidance is appreciated

Tony

__________________
Tony Aston
Register to Reply
Interested in this topic? By joining CR4 you can "subscribe" to
this discussion and receive notification when new comments are added.
Guru
United Kingdom - Member - Not a New Member Hobbies - Musician - New Member Hobbies - Fishing - New Member

Join Date: May 2006
Location: Reading, Berkshire, UK. Going under cover.
Posts: 9684
Good Answers: 468
#1

Re: Saving data in MsFlexgrid (VB6)

10/27/2010 6:21 AM

From a quick look around with the object browser, each flexgrid has a TextMatrix associated with it (2D - cells are accessed by (r,c) subscripts) and a TextArray (single subscript). It looks at first sight as if they are equivalent (i.e. share the same memory space). I havent looked any further - but I'd imagine you should be able to use one or other of these.

Good luck.

__________________
"Love justice, you who rule the world" - Dante Alighieri
Register to Reply
Guru
Engineering Fields - Electromechanical Engineering - Technical Services Manager Canada - Member - Army brat Popular Science - Cosmology - What is Time and what is Energy? Technical Fields - Architecture - Draftsperson Hobbies - RC Aircraft - New Member

Join Date: Sep 2006
Location: Clive, Alberta, Canada
Posts: 5916
Good Answers: 204
#2

Re: Saving Data in MsFlexgrid (VB6)

10/27/2010 10:40 PM

while we are being a bit lazy here... this would probably be simpler to build and maintain inside excel, using vba. (and you won't have to build the cell functionality)

just realize that every computer you want to install your app on will have to have the vb dll's installed too. (using flexgrid)

chris

Register to Reply
Register to Reply 2 comments

Previous in Forum: About ModBus   Next in Forum: Software Operation

Advertisement