jpg to be used as an active x control

ipbr21054

Well-known Member
Joined
Nov 16, 2010
Messages
5,699
Office Version
  1. 2007
Platform
  1. Windows
I would like to use a jpg image on my worksheet as i dont see any option in the insert Active x control box.
I have placed the images on my worksheet,copied the code from an existing active x control then assigned it etc to my image,saved.

I was assuming that when i press this image the code would run but nothing.

The same code works fine on the source it was copied from.
Is this possible or did i do something wrong ?

Code:
Private Sub CommandButton1_Click()
UserForm1.Show
End Sub

Private Sub CommandButton2_Click()
Rows("6:6").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("M6").Formula = "=TODAY()"
Range("A6").Select
End Sub

Private Sub Worksheet_Activate()
UserForm1.Show
Range("A6").Select

End Sub
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
An Image is not a Command Button. If you insert the ActiveX Image control, there is an Image Click event. Which the easiest way to get to is to right click on the Image Control and click on View Code. You can also set the image for the control here in the Picture property.
 
Upvote 0
All sorted.
I had the incorrect name for each file in the properties box.
 
Upvote 0

Forum statistics

Threads
1,223,227
Messages
6,170,853
Members
452,361
Latest member
d3ad3y3

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top