Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return Path of selected item from dialogbox
Hi I am using xlDialogInsertPicture from a commandbutton and would like to
capture the path of the user selected image, I have sent a lot of time looking for an answer can someone please help. TIA Charles |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Return Path of selected item from dialogbox
Why not just use application.getopenfilename and get the name (and insert the
picture, too). Kind of... Option Explicit Sub testme() Dim myPictName As Variant Dim myPict As Picture Dim wks As Worksheet Set wks = Worksheets("sheet1") myPictName _ = Application.GetOpenFilename("Picture files, *.bmp;*.jpg;*.gif") If myPictName = False Then MsgBox "try later!" Exit Sub End If With wks With .Range("a1:B9") Set myPict = .Parent.Pictures.Insert(myPictName) myPict.Top = .Top myPict.Left = .Left myPict.Width = .Width myPict.Height = .Height End With End With End Sub vqthomf wrote: Hi I am using xlDialogInsertPicture from a commandbutton and would like to capture the path of the user selected image, I have sent a lot of time looking for an answer can someone please help. TIA Charles -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Open Dialog Box to return Selected File Path and Not Open it. | Excel Programming | |||
Excluding VAT for selected item | Excel Worksheet Functions | |||
Return key to "OK" a DialogBox | Excel Programming | |||
ComboBox fails when last item selected first | Excel Programming | |||
Highlighting ser selected item! | Excel Programming |