| 
    
     |  | 下記の記述のようにフォルダーを指定して写真を貼り付けるマクロを作成したのですが、ダイアログの表示(ChDir Ph)を前回挿入した写真を選択した表示にする方法はないでしょうか? 
 Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, _
 Cancel As Boolean)
 Dim fName As String
 Const Ph As String = _
 "C:"
 ChDir Ph
 With Application
 fName = .GetOpenFilename("画像ファイル(*.jpg), *.jpg", _
 Title:="画像を選択して下さい")
 If fName = "False" Then GoTo ELine
 .ScreenUpdating = False
 End With
 Cancel = True
 With ActiveSheet.Pictures.Insert(fName)
 .Left = Selection.Left: .Top = Selection.Top
 .Width = Selection.Width: .Height = Selection.Height
 End With
 
 ELine:
 End Sub
 
 
 |  |