473,403 Members | 2,338 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

IEDoc.Click not working every time

BHo15
143 128KB
I am pulling URLs from charts generated from a website. I have the script written in Access VBA, and it works as designed. Unfortunately though, there is one button on one of the pages, that does not have a listed ID or Class. I connected to it using Set IEDoc = IE.Document.getElementsByTagName("td"), and then If IEDoc(258).getAttribute("Title") = "Save Chart" Then IEDoc(258).Focus

However... The click action actually works on the first stock, but on subsequent stocks, it doesn't actually perform the action (even though the code passes directly over the .Click statement).

The HTML for the button is attached.

Here is the actual block of code I am trying to use...

Expand|Select|Wrap|Line Numbers
  1.             Set IEDoc = IE.Document.getElementsByTagName("td")
  2.             If IEDoc(258).getAttribute("Title") = "Save Chart" Then
  3.                 IEDoc(258).Focus
  4.                 IEDoc(258).Click
  5.             ElseIf IEDoc(114).getAttribute("Title") = "Save Chart" Then
  6.                 IEDoc(114).Focus
  7.                 IEDoc(114).Click
  8.             End If
Any help would be greatly appreciated.
Attached Images
File Type: jpg HTML.jpg (8.0 KB, 155 views)
Dec 15 '16 #1
2 953
jforbes
1,107 Expert 1GB
Are you saying that the IEDoc(258).Click works, but then the IEDoc(114).Click doesn't work?
Dec 16 '16 #2
BHo15
143 128KB
Nope, sorry for the confusion. I saw that for some of the loops, the instance changed from 258 to 114. I was just trying to cover my basis.

It would hit on the first pass (258), and then not trigger the event on the next passes (even though most of them were also 258). I could see that it recognized the element, because it processed through the Then clause. It just didn't do anything.
Dec 16 '16 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: sonic | last post by:
hello, I have this custom datagrid control, that inherits from DataGrid. In addition to datagrid, I am adding a "status" table under it, and another html button, which will trigger a new row. ...
1
by: nesr235 | last post by:
I am having problems with my Button event not firing every time. I have a web page where the customer can enter search criteria and click a (search) button. This works fine the first time. But...
2
by: Fredrik G | last post by:
Whenever i hit F5, my project builds, but then i get an error "The operation could not be completed" Then i have to launch task manager, and end the "myproject.vshost.exe" process manually. Now,...
0
by: Rolf Barbakken | last post by:
I have a most annoying problem: I have a gridview with users from AD. When the user clicks on the header row a postback is triggered, and the _Sorting-event fires. This is fine, and my...
3
by: CptDondo | last post by:
I am working on an embedded system. The entire configuration for the system is stored in an XML file, which is pretty long. It takes about 3 seconds to open the file using domxml_open_file. ...
0
by: Rachana | last post by:
RecordSelectionFormula doesn't return correct records. every time Hi! I am working in VB6-CR8.5 Either I use RecordSelectionFormula or SqlQueryString, getting the same problem: My...
2
by: szy1 | last post by:
Hello, Im using very basic script to show records form database(mysql) and link that remove the record. And the problem is when i click delete link IE show same page with link 'delete'...
3
cooldilip
by: cooldilip | last post by:
This is My problem Every time i Start My PC... There will be a POP Up Saying The Search Keyword... RVTHOST.EXE doesnot exist... can you help to get rid of this... and During ShutDown there will...
1
by: yuva | last post by:
"Thank you for this amazing program. Within a weekend, my team increased with 50 new people joining. Every time I logged on there was a new affiliate. Absolutely amazing. " S. Horvath SOUTH AFRICA...
1
by: vineet1987 | last post by:
i want to generate a series of random numbers like 00101 01011 01111 01010 11101 it is a 5*5 matrix and is random every time upon execution my code is:-
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.