Results 1 to 6 of 6

Thread: Setting an MSHFlexGrid to nothing

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Posts
    1,384

    Setting an MSHFlexGrid to nothing

    How can I set the MSHFlexGrid to Nothing? i.e. Before I reload it I want to set it to Null or Nothing

    The reason being:
    When I load the grid initially there is no problems, but (only sometimes) when i reload it I get an Automation Error. I never get this error when I'm doing th initial load.

    I have tried:
    Grd.Collapse
    Grd.Refresh
    Grd.Clear
    Grd.ClearStructure

    You cannot:
    Set Grd = Nothing
    Set Grd = Null

    Any suggestions?
    Mel

  2. #2

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Posts
    1,384
    Someone?
    Mel

  3. #3
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    Set the number of rows back to zero.

    If you have fixed rows allow for these, i.e. if you have 1 fixed row set the rownumber back to 1 etc ...

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Posts
    1,384
    It's when I am setting the .Rows = 0 that the Automation Error is triggered. That's why I want to set the Grid to Nothing before I set the Rows to 0
    Mel

  5. #5
    Frenzied Member TheBionicOrange's Avatar
    Join Date
    Apr 2001
    Location
    Cardiff, UK
    Posts
    1,818
    Do you have any fixed rows ?

    If so setting the .Rows property to zero WILL cause an error.

    Sorry if I am sounding obvious, but thought I would check.

  6. #6

    Thread Starter
    Frenzied Member
    Join Date
    Nov 2001
    Posts
    1,384
    Yes I have .FixedRows = 1 but I tried to set it to 0 before I set .Rows to 0
    Mel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width