>Hello All,
>
>I am trying to remove a column from a grid programatically
>
>The remove works perfectly - but..
>When I go to refresh the grid (and re-jig the columns if necessary)
>I can't seem to detect if the column has already been removed or not
>
>If I then try RemoveObject again it causes an error.
>
>I have tried
>Vartype(This.Column30.name) && returns 'C'
>Type("This.Column30.name") && returns 'C'
>
>If you look at the column in debug all the properties are
>'Expression could not be evaluated'
>
>Anyone got any suggestions?
Just to add to the rest of the thread - I've had a similar behavior, for a different reason (had a controlsource for columns, but a blank source for the grid), and I've had a columncount of 0 but the debugger stil showed the columns as being there - but the column objects were not proper, several things were missing. Now that I've fixed the initial problem, I don't have this example anymore, but it only takes a few minutes in the debugger to see what are these phantom columns missing - maybe they have no header, no controlsource or whatever, you'll see.