Hi Gordon
One solution is to have the layer names as an array
Dim s_tablename() as string
then take the map from outside the loop ie below the loop.
Build the map from up as string strCommand
Dim strCommand as string
strCommand = "Map From "
for i = 1 to nValues
strCommand = strCommand + s_tablename _ ","
next
Run Command strCommand
I would use redim on the array rather than initialising to a fixed
value. Also you would need to allow for not adding "," on the last
value.
The code is only meant as an outline, and is just one solution.
Hope it solves your problem.
Regards
Bob
In message <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] writes
>Hi folks,
>
>I'm (trying!) to write an application to open a series of tab files in one map
>window.
>
>I have a tab file which has the extents of each map in our area. What I want to
>happen is that the user select the maps they want to be displayed then these
>maps are opened in one map window.
>
>What I've managed to get is that the user selects the maps they want to be
>displayed and each one opens in a separate map window.
>the following is my (probably amateurish!) code.
>
>I'd be very grateful for any help.
>
>Thanks in advance
>
>Gordon Stenhouse
>
>'sub procedure Openmap
>
>Sub Openmap
>
>Dim s_pathtablename As String
>Dim s_tablename As String
>Fetch First From Selection
>Do While Not EOT(Selection)
> s_pathtablename = Selection.pathtablename
> s_tablename = Selection.tablename
> Open Table s_pathtablename
> Map From s_tablename
> Fetch Next from Selection
>Loop
>End Sub
>
>________________________________________
>
>North of Scotland Water Authority
>http://www.noswa.co.uk
>Telephone: 0845 743 7437
>
>NOTE: Privileged/Confidential Information may be contained in this message.
>If you are not the addressee indicated in this message (or responsible for
>delivery of the message to such person), you may not copy or deliver this
>message to anyone. In such case, you should destroy this message and kindly
>notify the sender by reply e-mail. This e-mail and any attachments are believed
>to be virus free but no responsibility is accepted for loss or damage arising
>in any way from receipt or use thereof. Opinions, conclusions and other
>information in this message that do not relate to the official business of the
>North of Scotland Water Authority shall be understood as neither given nor
>endorsed by it.
>
>
>
>
>_______________________________________________________________________
>List hosting provided by Directions Magazine | www.directionsmag.com |
>To unsubscribe, send e-mail to [EMAIL PROTECTED] and
>put "unsubscribe MapInfo-L" in the message body.
--
Bob Young - www.bydesignwales.demon.co.uk
_______________________________________________________________________
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, send e-mail to [EMAIL PROTECTED] and
put "unsubscribe MapInfo-L" in the message body.