感謝版主的解答,依版主的程式碼 key in 試試看~~若有問題,再煩麻版主再給予解答指教~~謝謝~~作者: dsbleed 時間: 2011-2-25 13:59
請問版主,依照程式key in 之後,並不能執行現出訊息為:執行階段錯誤"13"型態不符合,
然後在With Sheet1.Shapes(sh)出現問題。不否麻煩版主看看∼謝謝∼∼
所key in 之程式如下:
Sub Macro1()
Dim a As Range
sh = Application.Caller
With Sheet1.Shapes(sh)
Set a = .TopLeftCell
h = a.Height
w = a.Width
.LockAspectRatio = msoFalse
.Height = IIf(.Height = h, h * 2, h)
.Width = IIf(.Width = w, w * 2, w)
.ZOrder msoBringToFront
End With
End Sub
Private Sub Workbook_Open()
Dim sh As Shape
With Sheet1
For Each sh In .Shapes
With sh
.OnAction = "Shape_Zoom"
.Height = .TopLeftCell.Height
.Width = .TopLeftCell.Width
End With
Next
End With
End Sub作者: Hsieh 時間: 2011-2-25 14:23