Sub Main 'Open Surfer 9 and use that instance to run the script Shell "c:\program files\golden software\Surfer 9\Surfer.exe" Wait 4 Dim SurferApp As Object Set SurferApp = GetObject(,"Surfer.Application") SurferApp.Visible = True Dim Plot As Object Set Plot = SurferApp.ActiveDocument 'Declares MapFrame as Object Dim MapFrame As Object 'Creates a contour map and assigns the map frame to the variable "MapFrame" Set MapFrame = Plot.Shapes.AddContourMap(GridFileName:=SurferApp.Path+"\Samples\demogrid.grd") End Sub