LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 61
Default Save sheet bitmap to desktop?

On Wed, 17 Aug 2011 06:31:48 -0700 (PDT), Don Guillett
wrote:

On Aug 17, 7:52*am, StargateFan wrote:
I have this macro which is invoked by pressing a button:

Sub Msg_CellsToBitmap()
'
* * Application.CutCopyMode = False
' * *Range(ActiveCell.Address,
ActiveCell.End(xlDown).Address).Select * * ' incorrect copy function;
need "copy to bitmap"
* * Range("B1:B4").CopyPicture Appearance:=xlScreen, Format:=xlBitmap
'================================================= ===================
* * MyMsgBox = MsgBox("The cells have been sent to the clipboard as an
image." & vbCrLf & vbCrLf & _
* * * * * * * * * * * "(Retrieve from the clipboard with, i.e., ^v
shortcut.) * * ", vbOKOnly + vbInformation, "DONE ...")
End Sub

Rather than saving the file manually, is there a way to save that
image to a bitmap on the desktop, with desktop destination as:

\\companyName\Users\Reception\Desktop\Tod+Tom.bmp

Thanks! *:oD

Modify to suit

Sub Create_GIF()
Dim fn As String
Dim mychart As Chart
fn = "c:\a\" & Range("a1").Value & ".gif"
'MsgBox fn
Set mychart = ActiveSheet.ChartObjects(1).Chart
mychart.Export Filename:=fn, FilterName:="GIF"
End Sub


I get a mismatch 13 error, again.

This time I didn't change anything other than the range (leaving the
formula as is gave me another error altogether and nothing happened):

Sub Create_GIF_Original()
Dim fn As String
Dim mychart As Chart
fn = "c:\a\" & Range("B1:B4").Value & ".gif"
'MsgBox fn
Set mychart = ActiveSheet.ChartObjects(1).Chart
mychart.Export Filename:=fn, FilterName:="GIF"
End Sub

The fn="c:\a\" ... line is highlighted in the debugger.

So I tried going back to some sort of basics. Using set mychart line
I got from the above code, googling came to this example:

http://answers.yahoo.com/question/in...1092437AAeLVto
Sub Create_GIF_of_workbook()
Dim mychart As Chart
Set mychart = ActiveSheet.ChartObjects(1).Chart
mychart.Export FileName:="P:\0DESKTOP\TOD+TOM.gif", FilterName:="GIF"
End Sub

But again error. This time 1004, Unable to get ChartObjects property
of the worksheet class.

All other attempts have failed so far. Help!

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Save as bitmap Maze[_2_] Excel Programming 6 January 11th 10 07:10 PM
save as - to any desktop Driftwood Excel Programming 2 July 28th 09 04:35 PM
how to save an image as a bitmap milkb1 Excel Programming 0 July 12th 07 04:46 PM
Save Userform as bitmap [email protected] Excel Programming 2 June 19th 06 04:06 PM
Save .xls as .txt In DeskTop Antonyo[_2_] Excel Programming 3 July 18th 05 01:52 PM


All times are GMT +1. The time now is 05:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"