Microsoft Excelでvbaを使用すると、ハイパーリンクやアクションを私が描いた図形に割り当てようとしています。ここでは、おおまかに試したことがあります(一度に1行だけコメントを外してください)。Excelのシェイプオブジェクトにハイパーリンクとonactionイベントを割り当てる方法
基本的には、シェイプオブジェクトをクリックしてより多くの情報を得ることができます。ハイパーリンクは問題ありませんが、パラメータを受け取る何らかの種類のイベントハンドラが理想的です。私は数百のこれらの図形を作成し、ドキュメント内の固有の場所にリンクする必要があります。
Dim destinationHyperlinkCell as Range
set destinationHyperlinkCell = Range("10:10")
' (do some stuff here)...
With Sheet1.Shapes.AddTextbox(msoTextOrientationHorizontal, _
600, _
600, _
300, _
16)
.TextFrame.Characters.Text = "Test this thing"
.Name = destinationHyperlinkCell.Address & " group of shapes"
'.Hyperlink.Address = destinationHyperlinkCell.Address
'.Hyperlink.Range = destinationHyperlinkCell.Address
'.OnAction = "'showDebugMsg """ & .Name & """'"
End With
ありがとう! Application.Callerでは、私は必要な柔軟性を持っています。上のコードは ".OnAction = Shape_Click()"です... –