Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Command Button and macro Bob[_16_] Excel Discussion (Misc queries) 4 June 12th 09 03:51 AM
Command Button to run a Macro Mark Allen Excel Worksheet Functions 2 June 4th 07 04:24 PM
Macro based on command button location? mattylance Excel Programming 5 June 23rd 06 12:09 PM
How do I hide a command button based on a condition? [email protected] Excel Programming 4 May 3rd 06 02:47 PM
Changing Command Button Based on Data Entry Bill Excel Programming 1 February 20th 06 10:32 PM


All times are GMT +1. The time now is 09:43 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"