# Programmatically create shapefiles from a table

**URL:** <https://mapwindow.discourse.group/t/programmatically-create-shapefiles-from-a-table/827>\
**Category:** Uncategorized\
**Created:** [December 13, 2020, 7:45am UTC](https://mapwindow.discourse.group/t/programmatically-create-shapefiles-from-a-table/827 "2020-12-13T07:45:59Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![stu](https://avatars.discourse-cdn.com/v4/letter/s/3ec8ea/32.png) [@stu](https://mapwindow.discourse.group/u/stu)\
**Post date:** [December 13, 2020, 7:45am UTC](https://mapwindow.discourse.group/t/programmatically-create-shapefiles-from-a-table/827/1 "2020-12-13T07:45:59Z")

</div>

I am using MapWinGIS in MS Access with VBA

I need to programmatically create shapefiles from a table. Right now my map is hardcoded with VBA DIM statements as follows: the file names and layer handles are hardcoded too.

```
   Dim ShapeFile_Boundary As New MapWinGIS.Shapefile
    Dim ShapeFile_Bridges As New MapWinGIS.Shapefile
    Dim ShapeFile_Culverts As New MapWinGIS.Shapefile
    Dim ShapeFile_Highways As New MapWinGIS.Shapefile

```

My knowlege of C## is limited, and I am having a hard time translating the C## examples to VBA.

I need a VBA example of WinMapGIS functions to programmatically

- Create the shapefiles
- open the shapefiles
- create layer handles

I’m stuck.

Thanks, stu

---

<div class="post-metadata">

**Author:** ![jerryfaust](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/jerryfaust/32/378_2.png) [@jerryfaust](https://mapwindow.discourse.group/u/jerryfaust)\
**Post date:** [December 16, 2020, 12:56am UTC](https://mapwindow.discourse.group/t/programmatically-create-shapefiles-from-a-table/827/2 "2020-12-16T00:56:08Z")

</div>

Hello Stu.

I see have a couple postings. To start off, try searching the forum using keywords like “ms access” or “vba” and see if you find any helpful hints.

Regards,  
Jerry.

---

<div class="post-metadata">

**Author:** ![pmeems](https://yyz2.discourse-cdn.com/free1/user_avatar/mapwindow.discourse.group/pmeems/32/9_2.png) [@pmeems](https://mapwindow.discourse.group/u/pmeems)\
**Post date:** [January 5, 2022, 3:10pm UTC](https://mapwindow.discourse.group/t/programmatically-create-shapefiles-from-a-table/827/3 "2022-01-05T15:10:42Z")

</div>


