Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim xlApp As excel.Application
- Set xlApp = New excel.Application
- Dim xlWkb As excel.Workbook
- Set xlWkb = xlApp.Workbooks.Open("D:DocumentsBook1.xlsx")
- Dim xlSht As excel.Worksheet
- Set xlSht = xlWkb.Worksheets(1)
- Dim xlChart As excel.Chart
- Set xlChart = xlWkb.Charts.Add
- xlChart.ChartType = xlLine
- xlChart.SetSourceData xlSht.Range("A1:B5"), xlColumns
- xlChart.Visible = xlSheetVisible
- xlChart.Legend.Clear
- xlChart.ChartArea.Font.Size = 15
- xlChart.ChartArea.Font.Color = vbRed
- xlChart.ChartArea.Select
- xlChart.ChartArea.Copy
- Image1.Picture = Clipboard.GetData(vbCFBitmap) ' Image1 is an image control already placed on the Form.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement