Closed Thread
Results 1 to 2 of 2

Macro required to paste values in selected cell

Hybrid View

  1. #1
    Registered User
    Join Date
    05-28-2012
    Location
    Montana
    MS-Off Ver
    Excel 2010
    Posts
    41

    Macro required to paste values in selected cell

    I'm stumped, and I believe this should be simple...

    What I'd like to do is make a macro to Copy cell values from A1:B5 (never changing - everytime the macro is run), but have the option to paste all values in any cell that is selected when I run the macro.

    Any ideas? Thanks for the help!

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,318

    Re: Macro required to paste values in selected cell

    Try

    Sub CopyCells()
        Range("A1:B5").Copy
        ActiveCell.PasteSpecial xlPasteValues
        Application.CutCopyMode = False
    End Sub
    HTH
    Regards, Jeff

Closed 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