Copying a chart to a user form

  • Thread starter samuel.dogbatse
  • Start date
S

samuel.dogbatse

Hello i am trying to copy a chart to a user form using :

Private Sub cmdagecharts_Click()
Dim chtchart As Chart
Dim image

Set chtchart = Sheet9.ChartObjects(1).Chart
image = chtchart.CopyPicture(xlScreen, xlPicture)
Set imgchtpic1.Picture = pastePicture(image)


End Sub

each time i run it this bit of code i get the error message Expected
Function or Variable

Your help is despirately needed
Many thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top