Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

FlexGrid additem

Posted on 2000-04-23
4
Medium Priority
?
1,703 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 45 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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 …
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
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…
Suggested Courses

618 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