View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Peter T Peter T is offline
external usenet poster
 
Posts: 5,600
Default Best format to export Excel Range to picture?? WMF??

Not sure why that errors, it was only a lazy way to fill the range with some
values for testing. Change the range to whatever you want and just do the
following

With Range("A1:H15") ' < change
'' .Value = 123.4567 ' remove this

.CopyPicture Appearance:=xlScreen, Format:=xlBitmap
'size to range plus a bit for chart border
Set chtObj = ActiveSheet.ChartObjects.Add( _
.Left, .Top, .Width + 6, .Height + 6)
End With

Actually, the only reasons I imagine why that line would error is if
- it was not placed within a With rng . End With block,
- cells are protected
- the activesheet is not a worksheet.

Regards,
Peter T


"Marcus" wrote in message
...
I get an error message with:
.Value = 123.4567

Why this line is for? By what can we replace it?

Many thanks for your expertise Guys!

Yvan