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?
hrolsonsAsked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
MedievalWarriorConnect With a Mentor Commented:
Try something like this
WebBrowser1.Document.GetElementById("cmdSave").Click

' OR

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

Open in new window

0
 
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
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
GeoffHarperCommented:
The <INPUT> tag is within the <FORM> tag (just making sure)?
0
 
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
 
hrolsonsAuthor Commented:
MedievalWarrior....


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

The first one worked perfect, upper case "S" and all!!!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.