Solved

Flex Grid Speed

Posted on 2000-05-03
3
393 Views
Last Modified: 2012-06-27
Right now I'm having trouble with using the flex grid in terms of speed.
When I'm opening a file,, with 1800 rows and 1 coloumn
or 800 rows and 10 coloumns.

It take aprox.  30sec to sucessfully input all the data onto the flex grid.

Is it possible to input data in a flex grid with 1 long line of code that will fill an entire row with desired data?
or,, speed things up?

Please comment,, on some suggestions to speed things up..

Right now, we are inputing data in each cell using loops.
0
Comment
Question by:aomega
3 Comments
 
LVL 28

Expert Comment

by:AzraSound
ID: 2774430
why not port this file to a database?
0
 
LVL 14

Expert Comment

by:wsh2
ID: 2774598
1. Set your MSFlexGrid.Redraw property to False to circumvent unnessary rendering.. or better yet.. set the MSFlexGrid.Visible property to False before loading. Run a benchmark on speed.. to gauge the improvement.

2. As you are loading cell by cell, it would appear that you are also inputting from disk cell by cell as well. Many small disk file reads are brutal when it comes to speed.. do whatever you can to make it a BIG disk read (all at once).. and the speed difference will be significant. Ideas for this would be as Azra suggested a Database.. or.. you could use an array stored as a Variant in a Binary access File. Not only are these methods faster, but they also reduce the amount of code required.
0
 
LVL 38

Accepted Solution

by:
PaulHews earned 100 total points
ID: 2774801
Instead of setting visible, set redraw to false before you load and set it true after.  Also the textmatrix and textarray properties are much faster than using row, col, text (If you didn't know this already :) ).  

You can also use additem with tab delimited items instead of putting in each cell, but I'm not sure that it is much faster (you would need to try.)
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
LINQ return type for nested group query 6 70
I need help formating a date variable in my VB.Net application 2 44
Hide vba in gp 7 79
How to make an ADE file by code? 11 79
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

932 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now