請問 如何用EXCEL 的按鈕功能 按下去,出現(我想要的) 圖片,謝謝~ 是要用VBA寫程式嗎? 我查了好久,查不到要怎麼寫 > < (不是要超連結喔~~~)?
回答 (2)
加一個按鈕;
加一個 module;
Sub ShowImage()
Dim xlShapes As Shapes
Dim xlShape As Shape
Dim ws As Worksheet
Dim rng As Range
Dim filename As String
Set rng = Range("a1")
filename = "d:\temp\myimage.jpg"
Set ws = ActiveSheet
Set xlShape = ws.Shapes.AddPicture(filename, msoFalse, msoTrue, rng.Top, rng.Left, rng.Width, rng.Height)
xlShape.LockAspectRatio = msoFalse
End Sub
錄製一個插入圖片的巨集
插入一個按鈕或圖形....右鍵..指定巨集
收錄日期: 2021-05-03 06:48:20
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20171225051105AAX3GGL
檢視 Wayback Machine 備份