Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Setup / November 2006

Tip: Looking for answers? Try searching our database.

Export custom Macro Button Images

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
RWN - 25 Nov 2006 21:17 GMT
Home -> xl2kPro, Work->xl'03
I routinely create macro's for various functions (Personal.xls) and export them to/from
work - no problems there

I also create custom button images and would like to export them as well.
Is there a way to do this or are they "hidden away" within the Button bar file?

Signature

Regards;
Rob
------------------------------------------------------------------------

Gary''s Student - 26 Nov 2006 11:52 GMT
This code (adapted from the Recorder) runs in a workbook called nurdel.xls
and assumes that N11 is free (you can use any cell).  A button has already
been created with an image on it.  The code:

1. copies the button and pastes the image onto the worksheet
2. saves the file as html
3. saves the file as xls

The html save produces a folder called nurdel_files.  In the folder is a jpg
file containing the picture that originally appeared in the button.

Sub snap_it()
ActiveSheet.Shapes("CommandButton1").Select
Selection.Copy
Range("N11").Select
With ActiveSheet
.PasteSpecial Format:="Picture (JPEG)", Link:=False, DisplayAsIcon:=False
End With

ActiveWorkbook.SaveAs Filename:= _
 "C:\Documents and Settings\Owner\Desktop\nurdel.htm", FileFormat:=xlHtml, _
 ReadOnlyRecommended:=False, CreateBackup:=False
ActiveWorkbook.SaveAs Filename:= _
 "C:\Documents and Settings\Owner\Desktop\nurdel.xls",
FileFormat:=xlNormal, _
 Password:="", WriteResPassword:="", ReadOnlyRecommended:=False, _
 CreateBackup:=False
End Sub
Signature

Gary's Student

> Home -> xl2kPro, Work->xl'03
> I routinely create macro's for various functions (Personal.xls) and export them to/from
> work - no problems there
>
> I also create custom button images and would like to export them as well.
> Is there a way to do this or are they "hidden away" within the Button bar file?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.