Solved

FlexGrid additem

Posted on 2000-04-23
4
1,692 Views
Last Modified: 2008-02-26
Hi i am using FlexGrid.additem method and it always results that the first row is always a blank row. Why does that happen ? Can anyone suggest anything ?
0
Comment
Question by:vbRetard
4 Comments
 
LVL 8

Expert Comment

by:stefanx
ID: 2742408
Uhmm, this should not happen. Are you sure that on initialization, your MSFlexgrid does not maybe have its Rows property set to 2?

Assuming that you have at least one Fixedrow, do the following int your Form_Load() sub :

MSFlexGrid1.Rows = 1

Then try you additems as before.
0
 

Author Comment

by:vbRetard
ID: 2742453
Yes i've tried that all but it still adds to the second row and leaves the first one blank.
0
 
LVL 38

Expert Comment

by:PaulHews
ID: 2742561
That's the way AddItem works for the flexgrid.  It adds a new row.  If you want to add text to an existing cell, you need to use .TextMatrix or .TextArray properties. These will add to the cell (Row, Col) that you specify.
0
 
LVL 6

Accepted Solution

by:
setiawan earned 15 total points
ID: 2742573
Hi vbRetard,

just try like this :

dim idx
idx = 1
MSFlexGrid1.addItem "abc" & chr(9) & "abc" & chr(9) ...., idx

note : use chr(9) as field delimiter in your grid
good luck

 danny
0

Featured Post

ScreenConnect 6.0 Free Trial

Check out the updates in one game-changing release, ScreenConnect 6.0, based on partner feedback. New features include a redesigned UI that improves session organization and overall user experience. See the enhancements for yourself!

Question has a verified solution.

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

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
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 …
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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…

773 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