Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
Hello, Is there any way how to export charts and selected areas in excel a picture. Thanks to all ... tomm -- tommy_gt ----------------------------------------------------------------------- tommy_gtr's Profile: http://www.excelforum.com/member.php...fo&userid=2608 View this thread: http://www.excelforum.com/showthread.php?threadid=47935 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
Hello Tommy, You can copy Charts and cells as pictures to the clipboard using th CopyPicture method for either one. Once its on the clipboard you ca paste it or print it. Someone, I don't remember who, wrote some code t save the clipboard contents to a file as a bitmap image. Perhaps someon will know and post the link for you. Sincerely, Leith Ros -- Leith Ros ----------------------------------------------------------------------- Leith Ross's Profile: http://www.excelforum.com/member.php...fo&userid=1846 View this thread: http://www.excelforum.com/showthread.php?threadid=47935 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
yes I know that I can copy area but I want to write a macro which can save it as picture... is it possible? thanks... tommy -- tommy_gtr ------------------------------------------------------------------------ tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089 View this thread: http://www.excelforum.com/showthread...hreadid=479358 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
Harald Staff's routine at David McRitchie's site:
http://www.mvps.org/dmcritchie/excel/xl2gif.htm Should do what you want for the range. And look at .export in VBA's help for your charts. From the example in that Help text: Worksheets("Sheet1").ChartObjects(1).Chart.Export _ FileName:="current_sales.gif", FilterName:="GIF" tommy_gtr wrote: Hello, Is there any way how to export charts and selected areas in excel as picture. Thanks to all ... tommy -- tommy_gtr ------------------------------------------------------------------------ tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089 View this thread: http://www.excelforum.com/showthread...hreadid=479358 -- Dave Peterson |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
Hi Dave, Thank you for your answer. I found this solution but I have problem with it too. I write about it here http://www.excelforum.com/showthread...ghlight=export If you have a little free time, please have a look. Nice day tommy -- tommy_gtr ------------------------------------------------------------------------ tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089 View this thread: http://www.excelforum.com/showthread...hreadid=479358 |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
I don't open attachments.
Maybe you could explain the problem in plain text. Or maybe someone will open your attachment and provide the answer you need. tommy_gtr wrote: Hi Dave, Thank you for your answer. I found this solution but I have problem with it too. I write about it here http://www.excelforum.com/showthread...ghlight=export If you have a little free time, please have a look. Nice day tommy -- tommy_gtr ------------------------------------------------------------------------ tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089 View this thread: http://www.excelforum.com/showthread...hreadid=479358 -- Dave Peterson |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
Hello, I understand that you don't want to open attachment and I thank you for your interest. I try to explain my problem with this code, but I think there is no real solution. So when I use this macro on various sheets it work very good and I'm happy for that. but problem is that when i use it in one special sheet in my project it doesn't work. The select range dialog appears, then I select some range and then I click ok. and that's all .... no save as dialog will appear. I tried to run this macro through steps in VB editor. I think that the problem is somewhere in this function: Function SelectArea() As String Dim Internrange As Range On Error GoTo Brutt Set Internrange = Application.InputBox("Select " _ & "range to be photographed:", "Picture Selection", _ Selection.AddressLocal, Type:=8) SelectArea = Internrange.Address Exit Function Brutt: SelectArea = "A1" End Function cause it jump over the line with "SelectArea = Internrange.Address" straight to "SelectArea = "A1". I dont know why .... On any other sheet it works fine... I found that when I change a width of some column that on some places in sheet it works. May it be caused by some limitation of excel ???? Thanks for your answer.... tommy -- tommy_gtr ------------------------------------------------------------------------ tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089 View this thread: http://www.excelforum.com/showthread...hreadid=479358 |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
Export as picture
I don't see anything in that function that would cause the error.
Are you sure you clicked the ok button? You could comment that "on error goto Brutt" line while you're testing. And a cursory glance at Harald's code looks like he expects that range to be on the activesheet. Did you activate the sheet before you chose the range? tommy_gtr wrote: Hello, I understand that you don't want to open attachment and I thank you for your interest. I try to explain my problem with this code, but I think there is no real solution. So when I use this macro on various sheets it work very good and I'm happy for that. but problem is that when i use it in one special sheet in my project it doesn't work. The select range dialog appears, then I select some range and then I click ok. and that's all .... no save as dialog will appear. I tried to run this macro through steps in VB editor. I think that the problem is somewhere in this function: Function SelectArea() As String Dim Internrange As Range On Error GoTo Brutt Set Internrange = Application.InputBox("Select " _ & "range to be photographed:", "Picture Selection", _ Selection.AddressLocal, Type:=8) SelectArea = Internrange.Address Exit Function Brutt: SelectArea = "A1" End Function cause it jump over the line with "SelectArea = Internrange.Address" straight to "SelectArea = "A1". I dont know why .... On any other sheet it works fine... I found that when I change a width of some column that on some places in sheet it works. May it be caused by some limitation of excel ???? Thanks for your answer.... tommy -- tommy_gtr ------------------------------------------------------------------------ tommy_gtr's Profile: http://www.excelforum.com/member.php...o&userid=26089 View this thread: http://www.excelforum.com/showthread...hreadid=479358 -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
export range as picture | Excel Programming | |||
How to export a range to a picture ? | Excel Programming | |||
Export Picture | Excel Programming | |||
How to export a picture or chart from Excel to PowerPoint? | Excel Programming | |||
Export picture as gif in Excel | Excel Programming |