I have a VBA program that automates an internet explorer process the whole code works except one piece.
when I try using this code, - Dim IEapp As Object
-
Dim IEdoc As Object
-
Set IEapp = New InternetExplorer
-
IEdoc.all("ctl00$ContentPlaceHolder1$uxQuantity").Value = 4
I recieve an error that says "Run-time error '91': Object variable or With block variable not set"
I think there is something I'm not seeing with the site source because I use a similar code for a different website and it works.
I have attached the site source to this email and if someone can look at it and let me know whay am I missing I would highly appreciate it.
Thanks
14 13672 Rabbit 12,516
Recognized Expert Moderator MVP
You never assign the IEDoc variable. Right now it's nothing.
thanks for your reply, oh sorry I missed up while copying the code -
Dim IEapp As Object
-
Dim IEdoc As Object
-
Set IEapp = New InternetExplorer
-
Set IEdoc = IEapp.document
-
IEdoc.all("ctl00$ContentPlaceHolder1$uxQuantity").Value = 4
-
I still have the same issue though, even with the IEDoc variable assigned
thanks
Rabbit 12,516
Recognized Expert Moderator MVP
You've instantiated an internet explorer object but it's not actually on a page. It's either on a blank page or on whatever the homepage is at. If it's at the homepage, then it's likely the page hasn't finished loading.
thanks for the reply and sorry I sent you a private message even though you had already replied but for some odd reason when I checked this post earlier it didn't show your reply.
anyway I have been trying to avoid bothering you with the whole code so I have been just copying the part with the problem but that seemed that it have caused more problem than helped. so here is the full code. Rabbit 12,516
Recognized Expert Moderator MVP
Can you post the source HTML of that page?
Sorry didn't have access to my work computer over the weekend. Anyway please find the source HTML attached. let me know if you can't open it. (Couldn't attach HTML so i had to zip the file)
Rabbit 12,516
Recognized Expert Moderator MVP
I don't see a control with the identified as ctl00$ContentPl aceHolder1$uxQu antity in the source.
I don't think you can see the whole webpage in the HTML file, however if you click (CTRL-F) in the "site source.txt" and paste "ctl00$ContentP laceHolder1$uxQ uantity" you will find that under "Input Name" and that is where I want to fill in the text box. I have also included a jpeg of what the site looks like if this helps any.
Rabbit 12,516
Recognized Expert Moderator MVP
Is it in a frame? Because you'll need to use - IEdoc.all("frameID").all("elementID")
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Ronen |
last post by:
Hi,
Does anyone experienced memory leak in Iexplore.exe when use treeview (MS IE
Controls?
I'm have tested this with a simple web page with a few tree nodes generated
on the server.
Then I added a setTimeout that postback the page every 2 seconds,
I checked the VM size of the IExplorer.exe and found out that it constantly
increases
|
by: Ofer Lavi |
last post by:
Hi,
I am trying to build an activeX that, if missing, will be downloaded
and setup automatically on the client's browser (internet explorer).
Using VB6, it was easy, using the <Object> tag, the classid attribute
for its reference, and the codebase attribute for its .cab file.
Now, I am using vb.net. I managed to create the object (using
ComClass<...> and ClassId, InterfaceId and EventsId.
|
by: v.srikhar |
last post by:
hi
I had some problem .Ii had to open the ms word file in IE itself not
outside using jsp or java
can any one solve it out.
thanks
|
by: Andy Chen |
last post by:
Some web sites offer contents in multiple languanges, we can do it manully
by click on IE Options - Internet options. My questions is how to change it
by C# code.
Thanks!
Andy
|
by: Wendy |
last post by:
Hello,
I have a program that does the following:
When a user clicks on a row in a VB.NET datagrid, it will open a web page in
Internet Explorer (that corresponds to that item in the selected row in the
datagrid). It will automatically print that web page, and then it will close
the Internet Explorer window. I have code that works perfectly when a
regular web page is opened, however when a pdf web page is opened the
printing never...
| |
by: pigeonrandle |
last post by:
Hi,
Has anyone tackled this before? I understand i might need to use the
DOM, but cant work out how to get the handle of a 'child window' from
it :(.
The instance of Internet Explorer Server is running in a process other
than my own just to make it more difficult!
Any ideas?!
James
|
by: jaggu |
last post by:
HI All,
I was making a demo were in i will set the uri path for the internet
explorer using setURI function....along with this i also want to set
the user name and password for the webpage contents ...like if my web
page is http://www.mail.yahoo.com...
then i want to fill the user name and password through my code itself
and sign in automatically....
How can i achieve this.....
|
by: gaurav2325 |
last post by:
Hi,
I would like to create a plugin for internet explorer to run my document. My document contains specific type of data, so that, I want whenever the user open that document (that is word document with special data embeded) my plugin gets the id of that embeded object and open with the specific application of MS office.
Pls help me out creating that plugin. I tried MSHTML (but dont have complete idea whether will it help or not)
...
|
by: nehacredo |
last post by:
hi alll..
i wanna display a word file content in a browser..how can i do that..i hav done one coding in that i can display the contents...but with contents some symbols also coming...
anyone pls help me
my code...
<%@ page import="java.io.*,javax.servlet.http.HttpServletRequest,javax.servlet.ServletInputStream" %>
<%@ page import="java.io.FileWriter,java.io.IOException" %>
<html>
<head>
<title>
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
| |
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
| |