Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #4  
Old 09-04-2017, 02:20 PM
macropod's Avatar
macropod macropod is offline recording ranges in macros Windows 7 64bit recording ranges in macros Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,521
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Quote:
Originally Posted by ewso View Post
What would I replace the range with in the macro for it to always use the selected range I have at the time of running the macro?
That really depends on what the recorded macro does and what you're trying to achieve. In come cases, you could get away with just referring to a Selection. However, once you start moving around and, for example, modifying other cells whose choice based on their logical relationship to the set you initially selected or to some other feature of a worksheet, that's soon going to prove very inadequate.

If you look about this forum, you'll see many coding examples, the better of which rarely entail selecting anything; a hallmark of recorded macros is that whatever they affect gets selected and there's often a lot of worksheet scrolling activating, etc.

If you want specific advice regarding the problem you're trying to solve, describe it to us and post the code you've recorded.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
recording ranges in macros Recording Macros in Word doingwork Word VBA 1 10-10-2015 12:54 AM
recording ranges in macros Problems with Recording Macros jekronenfeld Excel 6 09-26-2013 03:07 PM
recording ranges in macros Recording Macros in Word cameron.fairfull Word VBA 2 09-08-2011 08:24 AM
Recording Macros Tutorial? Madhouse Word VBA 1 04-28-2010 01:32 PM
Tutorial recording macros Jaffa Word VBA 0 04-27-2010 09:14 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:56 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft