Hello,
I'm trying to make a formula that gathers the top/bottom row # of a marco button and transfers the row #'s into Range command.
I've got this to work in a "MsgBox" format, but when trying transfer the same formula to a range select command, I seem to be out of my depth.
Sub CopyArea()MsgBox ("Top row of pressed button: " & ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row)
MsgBox ("Bottom row of pressed button: " & ActiveSheet.Shapes(Application.Caller).BottomRightCell.Row)
Range("D(ActiveSheet.Shapes(Application.Caller).TopLeftCell.Row):K(ActiveSheet.Shapes(Application.Caller).BottomRightCell.Row").Select
Selection.Copy
End Sub
Column Range is a constant D:K, but row numbers are dynamic and would vary throughout the document.
Any help would be appreciated. Thanks!
Bookmarks