Dim addTop Dim addLeft addTop = Range("A1").Top addLeft = Range("A1").Left Dim btn Set btn = Workbooks("hogeシート.xlsm").Sheets("hogehoge").Buttons.Add(addLeft + 19.5, addTop, 133.5, 37.5) btn.Characters.Text = "ボタン名" btn.OnAction = "マクロ名"
Dim addTop Dim addLeft addTop = Range("A1").Top addLeft = Range("A1").Left Dim btn Set btn = Workbooks("hogeシート.xlsm").Sheets("hogehoge").Buttons.Add(addLeft + 19.5, addTop, 133.5, 37.5) btn.Characters.Text = "ボタン名" btn.OnAction = "マクロ名"