Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Having trouble pressing HTML button from VB6

Posted on 2011-03-24
8
Medium Priority
?
489 Views
Last Modified: 2012-05-11
Normally to press a button, it works great to:
WebBrowser2.Document.All("btnUpdateTotals2").Click

But I have a button that is not cooperating:
'<input type="submit" name="cmdsave" id="cmdsave" class="fBtn11" value="Save">

How can I press this button?
0
Comment
Question by:hrolsons
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
8 Comments
 
LVL 4

Expert Comment

by:GeoffHarper
ID: 35210235
Do you mean you are trying

     WebBrowser2.Document.All("cmdsave").Click

and it doesn't work?
0
 

Author Comment

by:hrolsons
ID: 35210559
That is correct, I get:
Run-time error '91':
Object variable or With block variable not set
0
 
LVL 4

Expert Comment

by:GeoffHarper
ID: 35210859
The <INPUT> tag is within the <FORM> tag (just making sure)?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:hrolsons
ID: 35210896
Yes, the page I'm working with is "View Sales Record" on eBay.

<form>
...
<input type="submit" name="cmdsave" id="cmdsave" class="fBtn11" value="Save">
...
</form>
0
 
LVL 4

Expert Comment

by:GeoffHarper
ID: 35210944
It's not inside an <IFRAME> is it?  I've had situations where "View Source" would show me the whole page, but I wouldn't have access to the <IFRAME> within.

Just a thought...

0
 

Author Comment

by:hrolsons
ID: 35210996
No <IFRAME> on the page.
0
 
LVL 5

Accepted Solution

by:
MedievalWarrior earned 2000 total points
ID: 35211505
Try something like this
WebBrowser1.Document.GetElementById("cmdSave").Click

' OR

WebBrowser1.Document.GetElementById("cmdSave").Submit

Open in new window

0
 

Author Comment

by:hrolsons
ID: 35212144
MedievalWarrior....


Ding....Ding.....Ding...We have a winner!!!!!!!!!!!!!!!!!!!!

The first one worked perfect, upper case "S" and all!!!
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question