Hi Scott,

Dim i as smallint
For i = NumTables() To 1 Step -1
    Do Case TableInfo(i,TAB_INFO_NAME)
        Case "myFirstTable","mySecondTable"
            'ok, do nothing
        Case Else
            Close Table TableInfo(i,TAB_INFO_NAME)
    End Case
Next

Looping backwards ensures that you avoid a "cascading close" problem.

Best regards/Med venlig hilsen
Lars V. Nielsen
GisPro, Denmark
http://www.gispro.dk/
http://hjem.get2net.dk/lars-online/
WGS84: 10.20'40"E 55.20'20"N
----- Original Message -----
From: "Scott Snashall" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, December 15, 2002 6:01 PM
Subject: MI-L closing tables within mapbasic


>     Hello all,
>
>     I Have a mapbasic program in which I would like to have all tables except 2 
>specified tables close whener a user clicks a
specified button. the two tables that do not close will always be the same two tables.
>
> ie
>
> 7 tables open close all but 1 and 2
> 100 tables open close all but 1 and 2.
>
> Any help with this problem would be appreciated
>
> thanks
>
>
> Scott
>
>


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 4545

Reply via email to