id="body1:_id3:Number", _ giving an error

jnymris

New Member
Joined
Aug 16, 2011
Messages
10
Hello Guys

I'm currently running this script inside MS Excel
now this works (may have typos below) however when using this line ".body1:_id3:Number.Value=Range("B1")" it returns an error due to the _ However this is the Name & ID of this field. this CANNOT be change is their anyway i can still reference this field without changing the name and id of this field? If it's any use i know its the 3rd input box down?
Dim ObjIE as object
Set ObjIe = createobject ("internetExplorer.Application")
with ObjIe
.Navigate = "http://localhost/test.php"
Do While .busy:DoEvents:Loop
Do While .ReadyState<>4:DoEvents:Loop
.Visible = True
with .Documents.forms("myForm")
.body1:_id3:Number.Value=Range("B1")
.Submit
End With

Thanks Very Much

Jonathon Morris
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
If _id3 is part of body1 you could try:-
.body1._id3.number.value=range("B1").

Firstyly thanks very much for getting back to me !

However for some reason when I try .body1._id3.number it comes up with this property or method is not supported ? So instead of : subsititue the with . ? Didn't work but how we find the answer.

Thanks very much,

Johnny
 
Upvote 0
Bump. I also tried using
with .Documents.forms("myForm")
with .input("body1:_id3:Number")
.value =Range("B1")
end With
.Submit
End With

But again this did not work
Anyone have any more suggestions?

i dunno if theirs options to search by tag name in VBA and if to if i can filter to that input or not? if so any suggestions or an example for this?
 
Upvote 0
I got it working and for reference here is what I used !
The command getemenetsByTag

Dim ObjIE as object
Set ObjIe = createobject ("internetExplorer.Application")
with ObjIe
.Navigate = "http://localhost/test.php"
Do While .busy:DoEvents:Loop
Do While .ReadyState<>4:DoEvents:Loop
.Visible = True
with .Documents.forms("myForm")
.GetElementsByTagName("input").items(2).Value=Range("B1")
.Submit
End With
 
Last edited:
Upvote 0
Jonathon

Why not use GetElementByID?

That's assuming the _id3 part of the earlier code was referring to an ID.

By the way where did you get the syntax?
Code:
.body1:_id3:Number.Value=Range("B1")
Just curious really, it looks familiar but I can't place it.:)
 
Upvote 0
Hello Norie,

I Could not use getElementByID because the ID of the element is "body:_id3:Number", that's the ID now i have no idea why someone would name there ID this. The underscore was casuing the problem with getelementbyId hence why i used getelementsbytagName and then .Items
 
Upvote 0
Was that the actual idea when the page was loaded or in the code?

What I'm thinking is perhaps the 'strange' syntax is something to do with generating a unique id.

Mind you it could be my thinking that's 'strange'.:)
 
Upvote 0
Well who every designed the website I have no idea, what it is is the people like myself have to use like 6 different systems so I'm trying to create something which is kind of intrgate them. Hence why I want this to work with ms office excel :L and also got it to work :L
 
Upvote 0

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top