Keystrokes for website that does not allow paste

energywatch

New Member
Joined
Feb 4, 2014
Messages
6
Hello,

Any help to speed up my work with a very outdated website is very appreciated!

I currently am manually typing thousands of data inputs out to 6 decimals into an EXTREMELY outdated system that I have no control over.

Each project requires 10 inputs into the form. You can not tab, scroll, etc between the fields and you can not paste anything, everything must be typed with keystrokes. (crazy I know, I'm going nuts!)

I would like to build VBA that uses data in my excel sheet and then inputs it using keystrokes into the form. I dont know how to build the vba. Would this be done with SendKeys? I have never used that before. My thoughts are the macro could go two ways:

Faster, more complex code?
1. Copy each of the projects 10 inputs from excel as separate values (myinput1, myinput2, etc) then when I manually navigate to the site and click in 'box1' with my curser be able to have the macro "type" myinput1 for me (I could use some sort of quick key to reference input1, 2, etc.). Then I manually click on 'box2' and it types myinput2 for me. And the process continues until I reach the 10th box. I will then manually save.

It's still horribly manual, but the software is likely from 1973, or earlier, and does not seam to have a way around it for us data input minions.

Slower but simpler code?
2. Have a simple code that copies one cell value at a time, I manually place my cursor into the box on the software site, then Ctl+K does a keystroke of the value I just copied.

Example of my excel data is below


Input 1Input 2Input 3Input 4Input 5Input 6Input 7Input 8Input 9Input 10
Project 11.2336431.2364431.2336501.3336431.23364412.233643740.23364365.233643647.2996431.239843
Project 21.2365433.2364431.783650561.33364387.2336440.000000790.233003796.23667089.6578910.000000

<tbody>
</tbody>


Any help is much appreciated, this process takes HOURS each month. Its crazy how bad the software is, but I have no control over that part. I have to work within the system I have and try and make it faster.

*** I also have a second system which does allow pasting, but has the same navigation issues. If someone has a quick logic for saving 10 pieces of data at once, then pasting them. It would be copy, click, paste1, click paste2, click paste 3, .....

Look forward to feedback.
 
Last edited:

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
Upvote 0

John Thank you for your reply. This is not an internet explorer site. It is an intranet site for our company, so there is not way to reference a web location. Its simply clicking into boxes on the screen.

Click and Paste,
Click and Paste,
Click and Paste....no tab, no navigation functions capable.


DRSteele, this is not a website you would be able to visit. It is a company software interface, not a public domain website. Also, I am not getting data from the interface. I am submiting data to it. Excel --> Company Form. Its basically a webform from 1970. No tab, no navigation. I need to click in the form boxes and paste.

What I need help with is pulling the data in the correct form from excel, storing it and then pasting where I click.

So far all I have is selecting the data in B3 and then trying to copy/store it prior to paste.

The F2 and Ctl+Shift+Home Send Keys work but I have to manually strike ctl+c. When I add the SendKey to copy, everything breaks.

Sub Send_Keys_CtlA()
'Select Cell
Range("B3").Select
'Press F2
Application.SendKeys "{F2}", True
'Press Ctl+Shift+Home
Application.SendKeys "^+{Home}", True

'Copy (copy the same way copies with keystrokes?
'Application.SendKeys "^c", True
End Sub


An additional limitation to the site is that the only way to paste is if you copy the content of the cell in the formula bar, not the cell itself.

Once I get B3 working completely I would develop a more complex way to reference each input, store it and paste on command.
 
Last edited:
Upvote 0
I misunderstood. 'Tis way out of my realm, I fear. Best of luck!
 
Upvote 0
It is an intranet site for our company, so there is not way to reference a web location.
IE automation works with internet and intranet sites, i.e. any http:// or https:// address.

Its basically a webform from 1970.
So, is yours an intranet site, hosted in a browser?

Alternatively, you could try code which uses Windows API functions such as FindWindow and SendMessageByString, to locate and populate individual fields (windows) in the form. There is example code at AppActivate losing focus which writes text to a Notepad window, which you will need to modify for your situation. However, it may be that your 'webform' is a single window and any code is unable to reference individual fields (windows) within it. You will need a Windows 'spy' tool to see if your 'webform' contains windows - see winapi - Spy++ alternative that can send messages - Stack Overflow for several tools; the AutoIt tool mentioned might be a complete solution, and I think its objects can be called from Excel VBA.
 
Upvote 0

Forum statistics

Threads
1,215,059
Messages
6,122,913
Members
449,093
Latest member
dbomb1414

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top