Hello,
In Excel 2007, I'm trying to get data from a website using VBA so that I can process it.
I have to enter the website and enter in a part number to search on, then select the search result. Finally, I can highlight everything and copy to the clipboard. From there, I can work out the steps in the code to process the data.
Since the website does not change the URL based on my input, I haven't been able to just get the data directly from the website.
I was able to use the Sendkeys command to automate this process, but the results are erratic. For example, I have to tab 14 times on the first operation and 20 times on the second operation to select the right box. The first problem is that it doesn't always end up in the right place- sometimes passes the desired box. The second problem occurs when entering the part number (done as a single string)- sometimes the characters are repeated, like a stuck key (maybe the same problem as with the tabs).
I'm already using the "True" optional operator after the Sendkeys command to ensure the command is accepted before continuing. I don't see an option to select the time the key is depressed.
Any ideas would be appreciated.
In Excel 2007, I'm trying to get data from a website using VBA so that I can process it.
I have to enter the website and enter in a part number to search on, then select the search result. Finally, I can highlight everything and copy to the clipboard. From there, I can work out the steps in the code to process the data.
Since the website does not change the URL based on my input, I haven't been able to just get the data directly from the website.
I was able to use the Sendkeys command to automate this process, but the results are erratic. For example, I have to tab 14 times on the first operation and 20 times on the second operation to select the right box. The first problem is that it doesn't always end up in the right place- sometimes passes the desired box. The second problem occurs when entering the part number (done as a single string)- sometimes the characters are repeated, like a stuck key (maybe the same problem as with the tabs).
I'm already using the "True" optional operator after the Sendkeys command to ensure the command is accepted before continuing. I don't see an option to select the time the key is depressed.
Any ideas would be appreciated.