How to Insert Picture in Excel?
Hi friends!
I need your help on this VBA code, please! on the Excel worksheet, I have one "Image1" and "CommandButton1". at run time, when the user click on the "CommandButton1"(for inserting a picture), a small window popup with filter(.jpg, .bmp, .tif, etc.) so that the user can select a picture and click "Insert" button from this window and that picture will be inserted inside the "Image1" on the ExcelSheet Hopefully you can help me out this VBA code! thanks! Spike. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ |
How to Insert Picture in Excel?
How about:
Option Explicit Private Sub CommandButton1_Click() Dim myPictName As Variant myPictName = Application.GetOpenFilename _ (filefilter:="Picture Files,*.jpg;*.bmp;*.tif;*.gif") If myPictName = False Then Exit Sub End If Me.Image1.Picture = LoadPicture(myPictName) End Sub Spike wrote: Hi friends! I need your help on this VBA code, please! on the Excel worksheet, I have one "Image1" and "CommandButton1". at run time, when the user click on the "CommandButton1"(for inserting a picture), a small window popup with filter(.jpg, .bmp, .tif, etc.) so that the user can select a picture and click "Insert" button from this window and that picture will be inserted inside the "Image1" on the ExcelSheet Hopefully you can help me out this VBA code! thanks! Spike. ------------------------------------------------ ~~ Message posted from http://www.ExcelTip.com/ ~~ View and post usenet messages directly from http://www.ExcelForum.com/ -- Dave Peterson |
All times are GMT +1. The time now is 02:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com