0

not very good at VBA, just in the basics so got stuck at below idea.

I want a VBA to create a MapInfo Tab file and points with Legend from a table in excel with given coordinates and legend based on another column.

searched a lot online, but couldn't find more than the below.

CreateObject("MapInfo.Application")

Please guide me to accomplish this.

Thanks

sak
  • 13
  • 3

1 Answers1

1

There are two ways of doing this.

First option is to open MapInfo application (with CreateObject("MapInfo.Application")) and create TAB file there. However, this would be basically to write an MapBasic program, VBA would be only used to start MapInfo.

The second options is to create a MIF/MID file. These are two plain text files which can be imported into MapInfo. At this page Pitney Bowes states "We do publish the MapInfo Interchange Format (MIF\MID) files in our documentation", however you find it in Chapter 13 at normal MapInfo User Guide.

I would recommend the second option. Creating two plain text files in VBA should be feasible. A good starting point would be to create a TAB file manually and export this TAB file as MIF/MID, then you have a valid example file.

Wernfried Domscheit
  • 54,457
  • 9
  • 76
  • 110