Start Free Trial
Come for the solution, stay for everything else.
Start Free Trial
Vb.Net equivalent of VB6 HTMLElement.Click
Good Day Experts!
Yet another first here that I hope you can help me out with.
I converted a little VB6 project to Vb.Net(2005). I am having trouble with some HTML in it.
Dim x As HTMLHtmlElement
Dim xc As IHTMLElementCollection
For Each x In xc
If InStr(x.outerHTML, "Enter") > 0 Then
Set submitElement = x
The trouble I am having is finding the VB.Net equivalent for the .Click on submitElement.
Please ask questions as I am out of ideas after a a few hrs of trying.
8/22/2022 - Mon
Can you put what you are doing into context, what is it you are trying to achieve? Are you manipulating an associated web page somewhere, or is this just an arbitrary collection of elements?
I only ask because there may be a better way to achieve what you want rather than attempting a like-for-like conversion.
Thanks for your response. I will hope to get back to this little project this afternoon.
Equivalent in VB.NET would be
Your help has saved me hundreds of hours of internet surfing.
Hello everyone...finally able to get back on this project.
I am just trying submitElement.RaiseEvent("
Click") now and am receiving an error.
"An unhandled exception of type 'System.ArgumentException'
occurred in System.Windows.Forms.dll. Additional information: Value does not fall within the expected range".
The messagebox has two button labelled <Break> and <Continue>. My breakpoint is now green with an error in the left margin.
Any ideas? I am starting my search now.
Does it work with
Yes. I received the above error using it.
to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.
You replied "Yes" to my question "Does it work with following" but also said you received an error. So does it work or do you still receive the same error?
I apolgize, it was late when I responded.
I receive the error using submitElement.RaiseEvent("
I was just trying anything I could find while searching on the net. This is working but I don't understand why:
ASKER CERTIFIED SOLUTION
Log in or sign up to see answer
Become an EE member today
7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
See how we're fighting big data
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Thanks for your efforts...they led to make that discovery soultion.
Have a good day,
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
Plans and Pricing
Certified Expert Program
© 1996-2022 Experts Exchange, LLC. All rights reserved. Covered by US Patent