ボタンで右ズレ
Sub 右ズレ()
Dim rngA, rngB As Range
Set rngA = Range(ActiveSheet.Shapes(Application.Caller).TopLeftCell.Address) 'ボタンの左上セル番地
Set rngB = Range(ActiveSheet.Shapes(Application.Caller).BottomRightCell.Address).Offset(-1, -1) 'ボタン右下のセル番地
Application.CutCopyMode = False 'コピーモード解除
Range(rngA.Address, rngB.Address).Offset(0, 1).Insert (xlShiftToRight) 'ボタンサイズ分挿入して右へシフト
End Sub
This entry was posted
on 土曜日, 9月 18th, 2021 at 6:18 AM and is filed under VBA.
You can follow any responses to this entry through the RSS 2.0 feed.
Responses are currently closed, but you can trackback from your own site.