Sub Main 'Declare the variable that will reference the application Dim SurferApp As Object Set SurferApp = CreateObject("Surfer.Application") SurferApp.Visible = True 'Declares Plot as an object Dim Plot As Object Set Plot = SurferApp.Documents.Add 'Declares MapFrame as Object Dim MapFrame1 As Object 'Creates surface map and assigns the map frame to the variable "MapFrame" Set MapFrame1 = Plot.Shapes.AddSurface(GridFileName:=SurferApp.Path+"\samples\demogrid.grd") 'Creates a contour map and assigns the map frame to the variable "MapFrame" Set MapFrame2 = Plot.Shapes.AddContourMap(GridFileName:=SurferApp.Path+"\samples\demogrid.grd") Dim ContourMap As Object Set ContourMap = MapFrame2.Overlays(1) 'Creates a post map Set MapFrame3 = Plot.Shapes.AddPostMap (SurferApp.Path+"\samples\demogrid.dat") Dim PostMap As Object Set PostMap = MapFrame3.Overlays(1) 'Selects the three maps MapFrame1.Selected = True MapFrame2.Selected = True MapFrame3.Selected = True 'Overlays the maps and set the overlay to NewMapFrame Set NewMapFrame = Plot.Selection.OverlayMaps 'Breaks apart the overlay and sets the new map frame to NewMapFrame2 'For more overlay options, see Overlays Collection Set NewMapFrame2 = NewMapFrame.Overlays.BreakApart(pOverlay:=ContourMap) End Sub