How to copy paste Excel data to an Internet form

I wrote an excel macro which extracts payment data from the screen onto an excel worksheet.  

I want to copy paste the excel data onto an internet payment form.

If I copy data from several excel cells, and try and paste the data onto the internet payment form, all the data from the several excel cells gets pasted onto the first field on the internet form.  It does not tab down to the next input field on the internet form and paste the data from the next excel cell that is in the clipboard.

I set up a partial fix.  I set up a button on the excel worksheet which copies the current cell and goes down to the next cell.  Therefore, I can click on the excel button and paste to the corresponding field on the internet form.  It is not as fast as copying several cells in excel and pasting them in mass to all the fields on the internet form.

I am surprised that Microsoft doesn't have this copy/paste option.  Maybe they do, I just haven't come across it.

If there isn't a standard fix for this, is it possible to insert the Tab Function into the excel worksheet, so that it executes when you paste to the internet form?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

[ fanpages ]IT Services ConsultantCommented:
Hi Charlie65,

Is the "Internet payment form" shown upon a web page loaded in Internet Explorer (or another web browser)?

The way in which clipboard data is processed will be something that the destination application (the web browser) will handle (in conjunction with standard MS-Windows clipboard functionality).  If it is not expecting multiple fields of data, then it will simply paste all of the clipboard data into the active form field when the paste request is made.

What we could look at, however, is opening the "Internet payment form" via MS-Excel & copying the predefined cells to the form with a single request (via a button, for example), within the workbook.

Changing the way in which the web browser handles data pasted from the clipboard may well not be possible at all.


Charlie65Author Commented:
Sounds Great!!

How do I open the "Internet payment form" via MS-Excel?

[ fanpages ]IT Services ConsultantCommented:
As I do not know which "Internet payment form" you are using, I have just opened "" & pasted the contents of cells [A1] and [B1] into the "Search" criteria text field:

Option Explicit
Public Sub Yahoo()

  Dim objCollection                                     As Object
  Dim objInternetExplorer_Application                   As Object
  Set objInternetExplorer_Application = CreateObject("InternetExplorer.Application")
  objInternetExplorer_Application.Visible = True
  objInternetExplorer_Application.Navigate ""
  While (objInternetExplorer_Application.ReadyState <> 4) Or (objInternetExplorer_Application.Busy)
  Set objCollection = objInternetExplorer_Application.document.getElementsByTagName("input")
  objCollection(0&).Value = [A1] & " " & [B1]
  Set objCollection = Nothing
  Set objInternetExplorer_Application = Nothing
End Sub

Open in new window


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Excel

From novice to tech pro — start learning today.