Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.setup
RWN RWN is offline
external usenet poster
 
Posts: 104
Default Export custom Macro Button Images

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?

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


  #2   Report Post  
Posted to microsoft.public.excel.setup
external usenet poster
 
Posts: 11,058
Default Export custom Macro Button Images

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
--
Gary's Student


"RWN" wrote:

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?

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



Reply
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
Assign a macro to a command button SheriTingle Excel Discussion (Misc queries) 4 September 25th 06 06:38 PM
Assigning a macro to a command button SheriTingle Excel Discussion (Misc queries) 1 September 25th 06 06:34 PM
Macro button on toolbar Lesley Excel Discussion (Misc queries) 2 August 28th 06 07:32 PM
Copying a workbook with custom toolbar assigned to a macro Matt W Excel Discussion (Misc queries) 1 February 4th 05 10:46 PM
Macro to simply bring up the Find dialogue box?? marika1981 Excel Discussion (Misc queries) 14 January 14th 05 10:47 PM


All times are GMT +1. The time now is 04:34 PM.

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"