Sub Main
'Open Surfer 16 and use that instance to run the script
Shell "c:\program files\golden software\Surfer 16\Surfer.exe"

Wait 4

Dim SurferApp, Plot, MapFrame As Object
Set SurferApp = GetObject(,"Surfer.Application")
SurferApp.Visible = True
Set Plot = SurferApp.ActiveDocument

'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
