Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default $ dollar signs causing issues in Excel VBA - HTML

My goal is to automate a login process however the name of the Submit
button on the webpage is : "user$btnSubmit"

and when i put the following code in excel VBA, it will automatically
put a space after the $ as though its some kind of special character
and the code doesnt work


With ie2
With .Document.user$btnSubmit.Click()
End With
End With


HTML code:

<td<input type="submit" name="user$btnSubmit" value="Submit"
onclick="javascript:WebForm_DoPostBackWithOptions( new
WebForm_PostBackOptions(&quot;user$btnSubmit&quot; , &quot;&quot;,
true, &quot;&quot;, &quot;&quot;, false, false))" id="user_btnSubmit"
accesskey="S" /


i've managed to get it working with:

With ie2
With .Document.all.Item(158).Click()
End With
End With

however sometimes under certain circumstances, the button isnt located
under item 158.
and im also wanting to call other txt input boxes by name (which also
have $'s rather then item #s

Suggestions?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default $ dollar signs causing issues in Excel VBA - HTML

I've never worked with web "stuff" before, so this is only a guess... does
this work?

With .Document.all.Item("user$btnSubmit").Click()

Rick


wrote in message
ups.com...
My goal is to automate a login process however the name of the Submit
button on the webpage is : "user$btnSubmit"

and when i put the following code in excel VBA, it will automatically
put a space after the $ as though its some kind of special character
and the code doesnt work


With ie2
With .Document.user$btnSubmit.Click()
End With
End With


HTML code:

<td<input type="submit" name="user$btnSubmit" value="Submit"
onclick="javascript:WebForm_DoPostBackWithOptions( new
WebForm_PostBackOptions(&quot;user$btnSubmit&quot; , &quot;&quot;,
true, &quot;&quot;, &quot;&quot;, false, false))" id="user_btnSubmit"
accesskey="S" /


i've managed to get it working with:

With ie2
With .Document.all.Item(158).Click()
End With
End With

however sometimes under certain circumstances, the button isnt located
under item 158.
and im also wanting to call other txt input boxes by name (which also
have $'s rather then item #s

Suggestions?


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 236
Default $ dollar signs causing issues in Excel VBA - HTML

Suggestions. Experiment with variants of

..Document.Elements("user$btnSubmit").Click()
..Document.getElementsById("user_btnSubmit").Click ()

Try braces too which matches the syntax for some scripting languages
as in:

..Document.Elements["user$btnSubmit"].Click()


Also, look for a form tag as in "<form name='aForm' method=POST

Then try

..Document.Forms("aForm").getElementsById("usr_btn Submit").Click()

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
In Excel, what do the dollar signs mean in $A$1 pso827 Excel Worksheet Functions 4 April 3rd 23 12:14 PM
Dollar signs on all tabs scpa Excel Discussion (Misc queries) 4 July 15th 09 11:23 PM
Dollar signs in VBA Kletcho Excel Programming 4 April 12th 06 11:03 PM
Get excel 2005 to line up damn dollar signs properly. Idiots. DGWeeks Excel Discussion (Misc queries) 1 September 15th 05 06:51 AM
Dollar signs Lee New Users to Excel 4 August 25th 05 09:23 PM


All times are GMT +1. The time now is 06:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"