PDA

View Full Version : chose the items (ComboBox) from web site using VBA-Problem



Nader
02-22-2011, 04:47 AM
I tried this code and it succeed with me but it show problem with array in the line of

myTextField1.Value = "[14][166]" this code will deal with tow ComboBox the second depend on the first one .
the first one succeed but the second didn't shose any item ... it include to the array so I don't know how to insert it in the code
Dim myTextField As Object ' first combobox
Dim myTextField1 As Object ' second combobox
Set appie = CreateObject("INTERNETEXPLORER.APPLICATION")
appie.navigate "http://admin.isabill.tarassul.sy/?ag=1&aapp=180&aa=new"
appie.Visible = True
Do While appie.busy
DoEvents
Loop
With appie
Set myTextField = .document.all.Item("city_id")
myTextField.Value = "14"
Set myTextField1 = .document.all.Item("pop_id")
myTextField1.Value = "[14][166]" here is information about array

var pops = new Array();
;pops[14][166]='city'

p45cal
02-22-2011, 11:30 AM
People, before answering this, check that nader hasn't already had a solution from elsewhere:
http://www.vbforums.com/showthread.php?p=3965676
http://www.xtremevbtalk.com/showthread.php?p=1379293

Nader, it's only polite, when you cross-post, to tell each board/forum everywhere else you have cross posted, so that people don't waste their time and effort answering a question you may already have a solution for.

In answer to your question, it very much depends on the site concerned, what's on it and how it behaves. I can't gain access to that site (admin.isabill…).

Nader
02-22-2011, 02:52 PM
In the first I know you will know if I insert this post in another forum because this happen before. I do this because I'm in hurry in my project...second I found when I insert the solution from another forum it will be useful for various solution.
For the post you can cancel it...and thank you and I'm sorry ...

p45cal
02-22-2011, 03:35 PM
In the first I know you will know if I insert this post in another forum because this happen before.I may know this, but most won't. I only knew it because I searched for
pop_id and city_id on google, hoping that perhaps your site was similar to a publicly available one, but only your cross posts showed up, at sites which I don't normally visit at all.
People don't check whether you have posted in multiple places before beginning to answer a question on these forums.


I do this because I'm in hurry in my project So your time is more valuable that anyone else's. The time it takes you to post at three forums, and you can't afford the extra time to tell each where else you have posted - but you're happy for people to afford their time and effort, at three different locations giving you answers.


For the post you can cancel it... I'm not the moderator here, so I can't.

It's only consideration I'm looking for.
see:
http://www.excelguru.ca/node/7
and
http://www.ozgrid.com/forum/showthread.php?t=64659&page=1

Nader
02-23-2011, 10:37 AM
I read this linkS before

thank you all for help!

p45cal
02-23-2011, 10:40 AM
which begs the question; why didn't you heed them?

Nader
02-23-2011, 04:42 PM
which begs the question; why didn't you heed them?

I can't understand what do you mean?

p45cal
02-23-2011, 05:10 PM
well, you say you read them, but you ignored them