Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Visual Basic > VB 6 Visual Basic 6 > VB How-To
|
VB How-To Ask your "How do I do this with VB?" questions in this forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the VB How-To section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 1st, 2005, 08:40 AM
Authorized User
 
Join Date: Nov 2005
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default Rows and Cols Stuff : MSHFlexGrid

hello guys,

See the following code (it's in VB)


================================================
    For i = 1 To 3

        MSHFlexGrid1.AddItem ""
        MSHFlexGrid1.TextMatrix(i, 1) = "hye"

    Next i
=================================================

  At execution, it will create exactly three rows in MSHFlexGrid, filling with word "hye", right?

  Ok, what if i want to create three colums with single row, which can too fill the word "hye"..

  And remember, MSHFlexGrid1.TextMatrix(1, i) = "hye" in for loop is not working, giving this following error

  "Runt-ime erro '381', Subscript out of Range"



      Any Suggestion




                                            ~~Dev~~
__________________
~ ~ ~ There is no Right, There is no Wrong, KNOWLEDGE is Only the POWER ~ ~ ~
 
Old December 2nd, 2005, 01:21 AM
Authorized User
 
Join Date: Nov 2005
Posts: 34
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Let it be Guys, i just came to know that, using AddItem property, we can add only columns not rows, for creating rows and columns u have to go fol 'cols' and 'rows' property of MSHFlexGrid..

~ ~ ~ There is no Right, There is no Wrong, KNOWLEDGE is Only the POWER ~ ~ ~





Similar Threads
Thread Thread Starter Forum Replies Last Post
iterating through cols. of a recordset amit_p_patel VB How-To 3 May 24th, 2007 03:41 AM
How to add 2 cols in DataGrid1.DataKeyField drasko ADO.NET 8 May 4th, 2005 02:09 AM
Calc TEXTAREA ROWS & COLS based on Font Ron Howerton Classic ASP Basics 0 March 21st, 2005 11:17 AM
Comparing 2 cols. Hudson40 Excel VBA 5 February 9th, 2005 03:27 PM
Looking for Datagrid Cols&Columns reyboy Pro VB.NET 2002/2003 1 May 25th, 2004 08:12 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.