Results 1 to 8 of 8

Thread: Need a Macro to copy data from Excel to a Application

  1. #1
    Join Date
    Feb 2012
    Posts
    11

    Need a Macro to copy data from Excel to a Application

    I want to create a macro which will copy data in cell from excel to another application. I need to macro to run through column A copy the first cell (A1), and paste it an external application, The go to B2 in excel copy and paste in application and do the same until it reaches a blank cell and the macro stops. I have the basic concept to work the send keys with the application, but Im stuck how to loop in excel and proceed down the columns until it reaches a blank cell.
    Code:
     Sub copy()'
    'Excel Sheet
        Selection.Copy
    'Activate Application
        AppActivate "appname"
        Delay 1
        SendKeys "{HOME}{TAB 7}", True
        SendKeys "%(EP)", True
        SendKeys "{F2}", True 
      End Sub

  2. #2
    Join Date
    May 2011
    Posts
    523

    Re: Need a Macro to copy data from Excel to a Application

    If I do it in a loop would it work.
    Code:
    Do While Not IsEmpty(ActiveCell.Offset(0, 1))
    ActiveCell.Selection.Copy
    ActiveCell.Offset(1, 0).Select
    'Activate Application
    AppActivate "appname"
    Delay 1
    SendKeys "{HOME}{TAB 7}", True
    'EP=Edit Paste
    SendKeys "%(EP)", True
    SendKeys "{F2}", True

  3. #3
    Join Date
    Feb 2012
    Posts
    11

    Re: Need a Macro to copy data from Excel to a Application

    Thanks for the code above. It worked. I hope to get more valuable suggestion on the same on more advance queries.

  4. #4
    Join Date
    Apr 2012
    Posts
    3

    Re: Need a Macro to copy data from Excel to a Application

    Hi,
    I am looking for code which can copy the data from a different application to ms excel 2003.I am working on an application named as Host on Demand (http://www-01.ibm.com/software/webservers/hostondemand/) or you can say its a Main Frame application.can any one help me???

  5. #5
    Join Date
    Jul 2011
    Posts
    440

    Re: Need a Macro to copy data from Excel to a Application

    This is a nice cost effective tool which is a nice and secure option to have a browser or non browser base host access to an intranet network. You need to learn bit more on the same. I found a manual on the ibm site which will offer you more detailed information on requirement and deployment process.

    Introducing WebSphere Host On-Demand

  6. #6
    Join Date
    Apr 2012
    Posts
    3

    Re: Need a Macro to copy data from Excel to a Application

    Hi BillieJ,

    i found your response quite useful,however i would like to say that i am not too good in IBM Host on Demand Application ..so is there an easy SQL or VBA macro which can copy details from the HOD or Vice versa.your reply is awaited.

  7. #7
    Join Date
    Jul 2011
    Posts
    440

    Re: Need a Macro to copy data from Excel to a Application

    What most I can do is provide you a Host On-Demand Macro Programming Guide. This guide contains indetail information related to run automated macro for copying process. There is one more guide which provides you the same information but with images and sample. Called as Simple Host On-Demand Macros guide will let you to create easy macros.

  8. #8
    Join Date
    Apr 2012
    Posts
    3

    Re: Need a Macro to copy data from Excel to a Application

    Thank You so Much Bill...i guess this is gonna work and i am gonna try this for sure will get back to you ASAP with the Outcome...One More Question do we have any macro which can be used to copy details form PDF Sheet to Excel and Copy back Excel data in PDF?

Similar Threads

  1. Replies: 5
    Last Post: 25-02-2012, 11:09 AM
  2. Replies: 2
    Last Post: 07-02-2012, 06:01 PM
  3. how to copy data from sheet 1 to sheet 2 using macro
    By Messenger in forum Windows Software
    Replies: 3
    Last Post: 26-10-2010, 06:28 AM
  4. Macro onClick copy/paste Excel
    By MACE in forum Software Development
    Replies: 3
    Last Post: 09-12-2009, 03:58 PM
  5. Macro- Excel to copy cell content highlighted
    By Anwar in forum Windows Software
    Replies: 3
    Last Post: 06-03-2009, 02:04 PM

Tags for this Thread

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
  •  
Page generated in 1,713,242,027.97944 seconds with 17 queries