home *** CD-ROM | disk | FTP | other *** search
- Attribute VB_Name = "CommonCode"
- Option Explicit
-
- Global GlobalObjID&
-
- Sub ClearChartMenuChecks()
-
- MDIForm1.mnuChart2DBar.Checked = False
- MDIForm1.mnuChart3DBar.Checked = False
- MDIForm1.mnuChart2DPie.Checked = False
- MDIForm1.mnuChart3DPie.Checked = False
-
- Call MoveChartPictureToSheet
-
- End Sub
-
- Sub MoveChartPictureToSheet()
-
- #If Win32 Then
- Dim metafile&
- #Else
- Dim metafile%
- #End If
-
- Dim MapMode%, ObjID&
- Dim X1!, Y1!, X2!, Y2!
- Dim ExtentX&, ExtentY&
-
- ' If the chart is on the sheet then update it
- If MDIForm1.chkLink.Value = 1 Then
-
- ' Get the metafile from the chart
- ChartForm.VtChart1.GetMetafile VtPictureOptionNoSizeHeader, metafile, ExtentX, ExtentY
-
- ' Put metafile into existing object on sheet
- MapMode = 8 ' Anisotropic Mode (Stretchable)
- SheetForm.F1Book1.ObjSetPicture GlobalObjID, metafile, MapMode, ExtentX, ExtentY
-
- End If
-
- End Sub
-
- Sub ResizeArea()
-
- Dim Buffer$
-
- ' Get the last row and last column of the worksheet
- ' and create a Formula One reference
- With SheetForm.F1Book1
- Let Buffer = "A1:" & .FormatRCNr(.LastRow, .LastCol, False)
- End With
-
- ' Tell First Impression charting the worksheet, range, and parse method
- ChartForm.VtChart1.SsLinkSheet = SheetForm.F1Book1.TableName
- ChartForm.VtChart1.SsLinkRange = Buffer
- ChartForm.VtChart1.SsLinkMode = VtChSsLinkModeAutoParse
-
- End Sub
-
-