Solved

how to reset a msflexgrid control

Posted on 2004-10-30
841 Views
Last Modified: 2013-12-26
Hi,

I am trying to reset my flexgrid control once the user has pressed a "done" button. I could use help resetting the grid to only display the title bar ->>    MSFlexgrid.TextMatrix(0, whatever)

ive tried the msflexgrid.Redraw = (True) and msflexgrid.Refresh   but they don't get rid of rows which is what i am looking for. I did not see any delrow or any such property like that so I can't figure out how to delete a row using properties.

any help is appreciated.

thanks,
0
Question by:anger_beaver
    2 Comments
     
    LVL 18

    Accepted Solution

    by:
    This line will set the number of rows on a FlexGrid to 1. You can also do a similar thing with 'Cols'.

        MSFlexGrid1.Rows = 1
    0
     

    Expert Comment

    by:Wlada_230
    msFlexGrid1.Rows = 0
    msFlexGrid1.Cols = 0

    These two lines will clear entire control.

    You could also use next code to clear all cells

    For i = 0 to msFlexGrid1.Rows - 1
      For j = 0 to msFlexGrid1.Cols -1
        msFlexGrid1.TextMatrix(i,j)=""
      Next j
    Next i
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
    Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    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…

    856 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

    17 Experts available now in Live!

    Get 1:1 Help Now