Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro hardcoding issue
hi all, I keep hitting this problem and I'm sure there's a way to resolve this. When recording macros, I always use the Ctrl+arrow combinations to navigate across cells. But when I look at the code, there are always hardcoded cell numbers. Is there a list of functions I can use for Ctrl+arrow (or just the arrow) programatically? Thanks a lot! -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=559466 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro hardcoding issue
ActiveCell.End(xlDown/XlUp/xlToRight/xlToLeft).Select -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "cooldyood" wrote in message ... hi all, I keep hitting this problem and I'm sure there's a way to resolve this. When recording macros, I always use the Ctrl+arrow combinations to navigate across cells. But when I look at the code, there are always hardcoded cell numbers. Is there a list of functions I can use for Ctrl+arrow (or just the arrow) programatically? Thanks a lot! -- cooldyood ------------------------------------------------------------------------ cooldyood's Profile: http://www.excelforum.com/member.php...o&userid=35611 View this thread: http://www.excelforum.com/showthread...hreadid=559466 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro hardcoding issue
cooldyood wrote:
When recording macros, I always use the Ctrl+arrow combinations to navigate across cells. But when I look at the code, there are always hardcoded cell numbers. Is there a list of functions I can use for Ctrl+arrow (or just the arrow) programatically? When you record a macro the box that appears that lets you stop recording also has another button next to it (the one on the right). This button is a relative reference button. If you want all your actions hardcoded then leave it alone. But if you want to record Cntrl+arrow combinations to move around the cells, you should click the relative referrence button. You can click it more than once, to toggle between relative and absolute references within the same macro. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro hardcoding issue
On Fri, 07 Jul 2006 13:52:33 -0500, cooldyood wrote:
hi all, I keep hitting this problem and I'm sure there's a way to resolve this. When recording macros, I always use the Ctrl+arrow combinations to navigate across cells. But when I look at the code, there are always hardcoded cell numbers. Is there a list of functions I can use for Ctrl+arrow (or just the arrow) programatically? Thanks a lot! Use the .End method. Like this: < .... activecell.end(xlDown) .... There also exist constants xlUp, xlToLeft and xlToRight. Good luck. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro hardcoding issue
I can't find the "relative reference button" in the top menu. Is there macro toolbar too? I can't find it at all, not sure if the "relativ reference button" is in the toolbar. HeyNow100 Wrote: cooldyood wrote: When recording macros, I always use the Ctrl+arrow combinations to navigate across cells. But when I look at the code, there are always hardcoded cell numbers. Is there a list of functions I can use for Ctrl+arrow (or just the arrow) programatically? When you record a macro the box that appears that lets you stop recording also has another button next to it (the one on the right). This button is a relative reference button. If you want all your actions hardcoded then leave it alone. But if you want to record Cntrl+arrow combinations to move around the cells, you should clic the relative referrence button. You can click it more than once, to toggle between relative and absolute references within the same macro -- cooldyoo ----------------------------------------------------------------------- cooldyood's Profile: http://www.excelforum.com/member.php...fo&userid=3561 View this thread: http://www.excelforum.com/showthread.php?threadid=55946 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
delete rows w/o hardcoding numbers | Excel Programming | |||
Selecting worksheets without hardcoding | Excel Programming | |||
Selecting worksheets without hardcoding | Excel Programming | |||
How to open workbook from template without hardcoding | Excel Programming | |||
how to open workbook without hardcoding path | Excel Programming |