View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
mattylance[_2_] mattylance[_2_] is offline
external usenet poster
 
Posts: 1
Default Macro based on command button location?


My macro currently looks like this:
Sub Day1()
'
' Day1 Macro
' Macro recorded 6/20/2006 by Matt Lance
'

'
Range("V7:V28").Select
Selection.Copy
ActiveWindow.SmallScroll ToRight:=-7
Range("D7").Select
ActiveSheet.Paste
End Sub

What I want to do is have it so that instead of selecting D7 to paste
I want it to select the same column that the command button is in an
then the 7th row. This way I can have one macro used across severa
buttons instead of having a macro for every column I use.

Does anybody have any suggestions?

--
mattylanc
-----------------------------------------------------------------------
mattylance's Profile: http://www.excelforum.com/member.php...fo&userid=3507
View this thread: http://www.excelforum.com/showthread.php?threadid=55365