VBA PasteSpecial problem

SteveWright

New Member
Joined
Aug 26, 2009
Messages
44
Hi Guys,

I have a rather simple piece of code;

Sub ChartToImage()
Dim ch As ChartObject
Dim Sh As Worksheet
Dim chImg As Object

If MsgBox("This will remove all live charts in your document, do you want to continue?", vbOKCancel) = vbOK Then
For Each Sh In Worksheets
Sh.Activate
For Each ch In Sh.ChartObjects
ch.Copy
Sh.PasteSpecial Format:="Picture (Enhanced Metafile)", Link:=False, DisplayAsIcon:=False
Selection.top = ch.top
Selection.left = ch.left
ch.Delete
Range("A1").Select
Next ch
Next Sh
End If
End Sub

This basically just flattens a chart to an image. The problem is though, when I run this it changes all the "£" signs to "$" signs?

Can anyone see where I might be going wrong?

Many thanks,

Steve
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Strangely if I use "£ (English)" or "£ (Welsh)" this problem goes away. My problem still stands though as all our reports use the standard "£" without a counrty afterwards.
 
Upvote 0

Forum statistics

Threads
1,224,598
Messages
6,179,814
Members
452,945
Latest member
Bib195

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top