Hi Stefan,Thanks for the reply. Your code is certainly a lot simpler than the example I was working from. Having said this, ArcMap is still crashing each time it gets to the final line (see attachment for error). Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Dim GP As IGeoProcessor = New GeoProcessor
'Declare variables for input
Dim in_features As String
Dim out_path As String
Dim out_name As String
in_features = "C:\temp\TR_ROADS.shp"
out_path = "C:\temp"
out_name = "aaa.shp"
GP.FeatureclassToFeatureclass_conversion(in_features, out_path, out_name)
End Sub
I also found another example which supposedly take a shape file, creates a Personal GDB and writes the shape file to a feature class within: Private Sub btnOK_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnOK.Click
Dim GP As Object = CreateObject("esriGeoprocessing.GpDispatch.1")
Dim filepath As String = "c:\temp\"
GP.workspace = filepath
GP.CreatePersonalGDB_management(filepath, "aaa.mdb")
GP.FeatureclassToFeatureclass_conversion("TR_ROADS.shp", "aaa.mdb", "roads")
End Sub
This code created the the MDB OK, but again crashes on the final line (an MDA error is also displayed via visual studio).Can anyone help me get to the bottom of this?Regards. Rob.