Results 1 to 4 of 4

Using a VAR with a Goto

Threaded View

  1. #1
    Registered User
    Join Date
    01-21-2010
    Location
    Milano
    MS-Off Ver
    Excel 2003
    Posts
    9

    Using a VAR with a Goto

    Hi all,

    I need to copy a selection into a column but the cell where i need to do it can change.

    I managed to indicate the correct destination in a cell named "loc" but I don't know how to tell my macro to use this value.

    Here is the code I m trying to work with:

    Dim loc As Range
    
    loc = Worksheets("Resultat").Range("LOC")
        
        Range("D2:E5").Select  
        Selection.Copy
        Application.Goto Reference:=loc
        Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
            :=False, Transpose:=False

    Thanks for any clue you can give me
    Last edited by DonkeyOte; 02-12-2010 at 05:27 AM. Reason: code tags

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.6.0 RC 1