Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thank you. This was helpful
"Peter T" <peter_t@discussions wrote in message ... It looks like the default picture folder is found from an API and seems that can't be changed. Following does similar albeit more work. Sub test() Dim oldDir As String Dim lookFldr As String Dim vFile lookFldr = "C:\" ' << change oldDir = CurDir ChDir lookFldr 'Err.Clear ' add more picture extensions as required vFile = Application.GetOpenFilename("Picture Files,*.jpg;*.bmp;*.tif;*.gif", , _ "Insert your wonderful picture in cell " & ActiveCell.Address(0, 0)) If VarType(vFile) = vbString Then ActiveSheet.Pictures.Insert vFile ElseIf VarType(vFile) = vbError Then MsgBox "GetOpenFilename failed" Else 'if vfile = false user cancelled End If ChDir oldDir End Sub Regards, Peter T "Jack B. Pollack" wrote in message ... Hi, using application.dialogs( xldialoginsertpicture) to open a dialog box. How can I control the path that the dialog box open with? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel will not open in default file location | Excel Discussion (Misc queries) | |||
Macro - save to current location vs excel default location | Excel Discussion (Misc queries) | |||
Copy Chart and Insert in new Sheet as picture over the same location | Excel Programming | |||
how do i change the default location of my picture files in Excel | Excel Discussion (Misc queries) | |||
default location for files open commands | Excel Programming |