Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am using Office 2003 on Win XP.
I have coded a program that adds an ActiveX button (OLEObject) on a spreadsheet. Now I want to place an image on the surface of the button, which I can do manually, but the macro recorder doesn't pick up the keystrokes. Can someone please provide some example code that adds an image? Thanks much in advance. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub abc()
s = "C:\Documents and Settings\" & _ "OgilvyTW\My Documents\My Pictures\sample.jpg" ActiveSheet.CommandButton1.Picture = LoadPicture(s) End Sub -- Regards, Tom Ogilvy "quartz" wrote: I am using Office 2003 on Win XP. I have coded a program that adds an ActiveX button (OLEObject) on a spreadsheet. Now I want to place an image on the surface of the button, which I can do manually, but the macro recorder doesn't pick up the keystrokes. Can someone please provide some example code that adds an image? Thanks much in advance. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
add button to UserForm programmatically | Excel Programming | |||
How to add an image to a worksheet programmatically | Excel Discussion (Misc queries) | |||
How to save a bar chart as an image file programmatically? | Excel Programming | |||
Who can tell me how to programmatically insert an image into Excel by C#? | Excel Programming | |||
how to add code programmatically to a macro for a button | Excel Programming |