+ Reply to Thread
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    07-28-2009
    Location
    Egypt
    MS-Off Ver
    Excel 2003
    Posts
    35

    Variable-is it possible to specify the location as a variable

    Hi All ,

    is it possible to specify the location as a variable .

    i mean insated of (-5,2) to replace it with variable named (t,L )

    Thanks In Advance


    Code:
    found.Offset(-5, 2).Copy Destination:=dest_rng

  2. #2
    Forum Guru Andy Pope's Avatar
    Join Date
    05-10-2004
    Location
    Essex, UK
    MS-Off Ver
    2003 & 2007 & 2010
    Posts
    10,943

    re: Variable-is it possible to specify the location as a variable

    Yes,

    Code:
    t=-5
    L=2
    found.Offset(t, L).Copy Destination:=dest_rng
    Cheers
    Andy
    www.andypope.info

  3. #3
    Registered User
    Join Date
    07-28-2009
    Location
    Egypt
    MS-Off Ver
    Excel 2003
    Posts
    35

    re: Variable-is it possible to specify the location as a variable

    wow , i'm so lazy

  4. #4
    Forum Guru mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,984

    re: Variable-is it possible to specify the location as a variable

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

Thread Information

Users Browsing this Thread

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

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.2.0