LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 50
Default Change Imagebox Property?

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.P icture _
= 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.P icture _
= 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!
 
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
'On change' property matpj[_66_] Excel Programming 4 May 16th 06 02:23 PM
Change insidewidth property M Selvaraj Charts and Charting in Excel 1 April 23rd 06 01:07 PM
Change property of comments only Martin[_21_] Excel Programming 4 September 29th 05 04:29 PM
Combobox change property SASMan Excel Programming 1 November 30th 04 11:22 PM
Problem using imagebox with wmf files Rem Excel Programming 0 April 5th 04 03:14 PM


All times are GMT +1. The time now is 07:31 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"