[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 491
  • Last Modified:

Having trouble pressing HTML button from VB6

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
hrolsons
Asked:
hrolsons
  • 4
  • 3
1 Solution
 
GeoffHarperCommented:
Do you mean you are trying

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

and it doesn't work?
0
 
hrolsonsAuthor Commented:
That is correct, I get:
Run-time error '91':
Object variable or With block variable not set
0
 
GeoffHarperCommented:
The <INPUT> tag is within the <FORM> tag (just making sure)?
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
hrolsonsAuthor Commented:
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
 
GeoffHarperCommented:
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
 
hrolsonsAuthor Commented:
No <IFRAME> on the page.
0
 
MedievalWarriorCommented:
Try something like this
WebBrowser1.Document.GetElementById("cmdSave").Click

' OR

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

Open in new window

0
 
hrolsonsAuthor Commented:
MedievalWarrior....


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

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

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 4
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now