+ Reply to Thread
Results 1 to 5 of 5

Simple copy macro

  1. #1
    Registered User
    Join Date
    08-28-2005
    Posts
    62

    Simple copy macro

    This should be pretty simple. I need a macro that copies specific cells so I can paste them into another program.

    I want to be able to select a cell in a specific row to select that row of data.
    Then click a button.
    The macro will copy the cells from that selected row. From column AM to BB.
    Then once it's copied all i have to do it click on my other program and click paste.

  2. #2
    Registered User
    Join Date
    01-05-2007
    Posts
    13

    Simple Macro

    Optitron,
    I hope this few lines of code would help you.
    In case you also need to open the application you intend to paste the data to, just add this line Call shell ("Path\application.exe")

    Example: Call shell ("c:\windows\notepad.exe") there after hit edit paste the data should be in your desired applicaton.

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro created by 1/5/2007 by optitron
    '
    '
    Range("AM:BB").Select
    Selection.Copy

    End Sub

  3. #3
    Registered User
    Join Date
    08-28-2005
    Posts
    62
    Thank you but that code copies the entire column. My problem is I need to copy the cells in column AM:BB of the row I selected.


    Quote Originally Posted by emmamaki
    Optitron,
    I hope this few lines of code would help you.
    In case you also need to open the application you intend to paste the data to, just add this line Call shell ("Path\application.exe")

    Example: Call shell ("c:\windows\notepad.exe") there after hit edit paste the data should be in your desired applicaton.

    Sub Macro1()
    '
    ' Macro1 Macro
    ' Macro created by 1/5/2007 by optitron
    '
    '
    Range("AM:BB").Select
    Selection.Copy

    End Sub

  4. #4
    Forum Expert
    Join Date
    12-29-2004
    Location
    Michigan, USA
    MS-Off Ver
    2013
    Posts
    2,208
    Try this:

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    08-28-2005
    Posts
    62
    Perfect, it worked. Thank you.

    Quote Originally Posted by jasoncw
    Try this:

    Please Login or Register  to view this content.

+ 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