M
mooresk257
I posted the code earlier on a different topic:
Private Sub Image1_Click()
FileToOpen = Application.GetOpenFilename( _
"All Files (*.jpg),*.jpg,(*.bmp),*.bmp")
If FileToOpen <> False Then
Worksheets("Sheet1").OLEObjects("Image1").Object.Picture _
= LoadPicture(FileToOpen)
End If
End Sub
If I want to remove the image, I have to change the image box Picture
property to "none". Can anyone help with the code for setting properties?
I think I'd need something like
Worksheets("Sheet1").OLEObjects("Image1").Object.Picture _
= None
Is it possible to assign this to a right-click event? Or, maybe I should add
some code for a message box prompting to add or remove an image. I'm not sure
what the simplest solution is.
I'm so rusty on VB code - it's been years since I messed with it.
Thanks folks!
Private Sub Image1_Click()
FileToOpen = Application.GetOpenFilename( _
"All Files (*.jpg),*.jpg,(*.bmp),*.bmp")
If FileToOpen <> False Then
Worksheets("Sheet1").OLEObjects("Image1").Object.Picture _
= LoadPicture(FileToOpen)
End If
End Sub
If I want to remove the image, I have to change the image box Picture
property to "none". Can anyone help with the code for setting properties?
I think I'd need something like
Worksheets("Sheet1").OLEObjects("Image1").Object.Picture _
= None
Is it possible to assign this to a right-click event? Or, maybe I should add
some code for a message box prompting to add or remove an image. I'm not sure
what the simplest solution is.
I'm so rusty on VB code - it's been years since I messed with it.
Thanks folks!