Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Insert Photo - error on cancel
Hi,
I have the following code for a picture box to load an image file: Private Sub Image1_Click() FileToOpen = Application.GetOpenFilename("All Files (*.jpg),*.jpg,(*.bmp),*.bmp") Worksheets("Sheet1").OLEObjects("Image1").Object.P icture _ = LoadPicture(FileToOpen) End Sub which works fine unless I click "cancel" instead of selecting an image file, at which point there is an error. How to I allow the process to abort cleanly on "cancel"? Thanks! |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I insert a photo into a specific cell? | Excel Discussion (Misc queries) | |||
Help- Insert text if photo file not available | Excel Discussion (Misc queries) | |||
Insert Photo - help | Excel Discussion (Misc queries) | |||
How to insert a photo in the background for printing. | Excel Discussion (Misc queries) | |||
Looping to insert photo | Excel Programming |