- 帖子
- 5923
- 主題
- 13
- 精華
- 1
- 積分
- 5986
- 點名
- 0
- 作業系統
- win10
- 軟體版本
- Office 2010
- 閱讀權限
- 150
- 性別
- 男
- 來自
- 台灣基隆
- 註冊時間
- 2010-5-1
- 最後登錄
- 2022-1-23
        
|
回復 1# tku0216
移動滑鼠點選 儲存格上 有圖片檔案名稱 會顯示 該檔案名稱的圖片- Private Sub Worksheet_SelectionChange(ByVal Target As Range) '該工作表的事件 程序
- Dim xPath As String
- On Error Resume Next
- xPath = "d:\" '修改為圖片檔 的路徑資料夾
- [xlTarget].ClearComments
- If Target(1) = "" Then Exit Sub
- If Dir(xPath & Target) = "" Then Exit Sub
- Target.Name = "xlTarget"
- [xlTarget].NoteText " "
- With Target.Comment.Shape '儲存格註解文字圖案
- .TextFrame.Characters.Font.ColorIndex = 1
- .TextFrame.Characters.Font.Size = 14
- .Fill.ForeColor.SchemeColor = 13
- .AutoShapeType = msoShapeRectangle
- .Line.ForeColor.SchemeColor = 53
- .Line.Weight = 2
- .Fill.UserPicture xPath & Target
- .ScaleWidth 4, 0
- .ScaleHeight 3, 0
- .Visible = True
- End With
- End Sub
複製代碼 如圖
|
|