+ Reply to Thread
Results 1 to 2 of 2

new to macro editing: how to force the selected cell?

  1. #1
    Registered User
    Join Date
    05-28-2008
    Posts
    13

    new to macro editing: how to force the selected cell?

    I'm new to editing macros, so please bear with me if this is a basic question.

    I'm trying to write a macro to create a keyboard shortcut for
    Paste Special > Values

    Heres' the recorded macro:
    Sub PASTE_SPECIAL_VALUES()
    '
    ' PASTE_SPECIAL_VALUES Macro
    ' Macro recorded 6/26/2008 by LKB
    '
    ' Keyboard Shortcut: Ctrl+Shift+V
    '
    Range("D24").Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    End Sub
    The problem is it ALWAYS puts the value in cell D24. What do I put in there to tell it the range is the selected cell(s)?

    Thanks!

  2. #2
    Registered User
    Join Date
    05-28-2008
    Posts
    13

    Figured It Out

    Quote Originally Posted by lkb3
    I'm new to editing macros, so please bear with me if this is a basic question.

    I'm trying to write a macro to create a keyboard shortcut for
    Paste Special > Values

    Heres' the recorded macro:


    The problem is it ALWAYS puts the value in cell D24. What do I put in there to tell it the range is the selected cell(s)?

    Thanks!

    That was easy - it needs to be
    With Selection.PasteSpecial....

+ Reply to Thread

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