+ Reply to Thread
Results 1 to 3 of 3

Cannot create macros using relative position

  1. #1
    Registered User
    Join Date
    10-20-2008
    Location
    st. lous, mo
    Posts
    1

    Cannot create macros using relative position

    I am trying to create macros that are not cell specific but task oriented. For example, I want to place the cursor on destination cell in worksheet 1, goto worksheet 2, search for a string, copy the next 3 lines and then past back on worksheet 1. However, i cannot record what i would call relative behaviour.
    The recording will only pick up specific cell locations. To clarify, regardless of the search on worksheet 2, this macro will ALWAYS copy (A18:A20) not 'the next 3 lines from the cursor after search and find puts the cursor on cell with found text. Ex. below
    Please Login or Register  to view this content.
    Last edited by royUK; 10-21-2008 at 05:11 AM. Reason: add code tags

  2. #2
    Forum Contributor
    Join Date
    05-21-2004
    Location
    UK
    Posts
    136
    The macro recorder is absolute, that is how it is. You have to see it as a starting point, adapt what it gives you

    Please Login or Register  to view this content.

  3. #3
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200
    foureasleys, please take the time to read the Forum Rules & in future use Code Tags when posting code. Also macro questions should be posted in the Programming Forum.
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Create a Toolbar of Macros through Add-in///
    By nishan22 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-03-2011, 11:59 AM
  2. How to create a form with select check box to run different macros ?
    By yannipr in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-24-2008, 11:00 AM
  3. Can't create macros in Excel 2007
    By madwab in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-28-2008, 06:07 AM
  4. Determining relative file path macro
    By ctmurray in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-18-2007, 12:25 AM
  5. Can Macros create Macros?
    By johnsid in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-21-2007, 10:43 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1