473,218 Members | 1,724 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,218 software developers and data experts.

WithEvents does not work for me in Win98?

This works fine in Win XP but does not work at all in Win 98.
Private WithEvents objIExplorer As InternetExplorer

I have to do it like this to get it to work in Win 98
Dim objIExplorer As InternetExplorer But then I cant see when a user exit my
objIExplorer and than an error will show up when I try to open a link in the
IE window that does not exist...

What can I do about this and way does it not work in win 98?

(This does not work at all with Private WithEvents objIExplorer As
InternetExplorer)
If objIExplorer Is Nothing Then
Set objIExplorer = New InternetExplorer ' ******* Here is where the
Error will show up****
With objIExplorer
.AddressBar = True
.MenuBar = True
.StatusBar = True
.ToolBar = True
.Visible = True
DoEvents
End With
End If

Yours, Jonas
Jul 17 '05 #1
7 4815
"does not work" is insufficient. What is the error message.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"Jonas" <ba*******@hotmail.com> wrote in message
news:ZY********************@newsb.telia.net...
: This works fine in Win XP but does not work at all in Win 98.
: Private WithEvents objIExplorer As InternetExplorer
:
: I have to do it like this to get it to work in Win 98
: Dim objIExplorer As InternetExplorer But then I cant see when a user exit
my
: objIExplorer and than an error will show up when I try to open a link in
the
: IE window that does not exist...
:
: What can I do about this and way does it not work in win 98?
:
: (This does not work at all with Private WithEvents objIExplorer As
: InternetExplorer)
: If objIExplorer Is Nothing Then
: Set objIExplorer = New InternetExplorer ' ******* Here is where the
: Error will show up****
: With objIExplorer
: .AddressBar = True
: .MenuBar = True
: .StatusBar = True
: .ToolBar = True
: .Visible = True
: DoEvents
: End With
: End If
:
: Yours, Jonas
:
:
Jul 17 '05 #2
This is the error message:

Run-time error '-2147023067 (80070725)':
Automation error

"Randy Birch" <rg************@mvps.org> skrev i meddelandet
news:wA*******************@news04.bloor.is.net.cab le.rogers.com...
"does not work" is insufficient. What is the error message.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"Jonas" <ba*******@hotmail.com> wrote in message
news:ZY********************@newsb.telia.net...
: This works fine in Win XP but does not work at all in Win 98.
: Private WithEvents objIExplorer As InternetExplorer
:
: I have to do it like this to get it to work in Win 98
: Dim objIExplorer As InternetExplorer But then I cant see when a user exit my
: objIExplorer and than an error will show up when I try to open a link in
the
: IE window that does not exist...
:
: What can I do about this and way does it not work in win 98?
:
: (This does not work at all with Private WithEvents objIExplorer As
: InternetExplorer)
: If objIExplorer Is Nothing Then
: Set objIExplorer = New InternetExplorer ' ******* Here is where the
: Error will show up****
: With objIExplorer
: .AddressBar = True
: .MenuBar = True
: .StatusBar = True
: .ToolBar = True
: .Visible = True
: DoEvents
: End With
: End If
:
: Yours, Jonas
:
:

Jul 17 '05 #3
Knowledge Base

PRB: Run-time error -2147023071 (80070721) using WithEventsPSS ID Number:
171456

Article Last Modified on 1/11/2001
--------------------------------------------------------------------------------
The information in this article applies to:
a.. Microsoft Visual Basic Control Creation Edition for Windows 5.0
b.. Microsoft Visual Basic Learning Edition for Windows 5.0
c.. Microsoft Visual Basic Learning Edition for Windows 6.0
d.. Microsoft Visual Basic Professional Edition for Windows 5.0
e.. Microsoft Visual Basic Professional Edition for Windows 6.0
f.. Microsoft Visual Basic Enterprise Edition for Windows 5.0
g.. Microsoft Visual Basic Enterprise Edition for Windows 6.0

--------------------------------------------------------------------------------

This article was previously published under Q171456
SYMPTOMS
When using an ActiveX component that defines events, you may receive the
following error when this component is accessed through DCOM.

Run-time error -2147023071 (80070721)
Automation Error

This error does not occur if the ActiveX component is used locally or if the
client does not instantiate the remote object using the WithEvents
statement.
CAUSE
This problem occurs because you did not set the appropriate identity for the
server.
RESOLUTION
To resolve this problem, refer to the following articles in the Microsoft
Knowledge Base:
267836 HOWTO: Create a DCOM Client/Server with Events by Using Visual Basic

268550 HOWTO: Use Dcomcnfg for a Visual Basic DCOM Client/Server Application

269330 HOWTO: Troubleshoot DCOM for Visual Basic Client/Server Applications

Additional query words: -2147023071 (80070721)

Keywords: kberrmsg kbprb KB171456
Technology: kbAudDeveloper kbVB500 kbVB500Search kbVB600 kbVB600Search
kbVBA500Search kbVBSearch kbZNotKeyword2 kbZNotKeyword3 kbZNotKeyword6

--------------------------------------------------------------------------------

Send feedback to Microsoft

2003 Microsoft Corporation. All rights reserved.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"Jonas" <ba*******@hotmail.com> wrote in message
news:2V********************@newsc.telia.net...
: This is the error message:
:
: Run-time error '-2147023067 (80070725)':
: Automation error
:
:
:
: "Randy Birch" <rg************@mvps.org> skrev i meddelandet
: news:wA*******************@news04.bloor.is.net.cab le.rogers.com...
: > "does not work" is insufficient. What is the error message.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: > There's no place like 127.0.0.1
: >
: >
: > "Jonas" <ba*******@hotmail.com> wrote in message
: > news:ZY********************@newsb.telia.net...
: > : This works fine in Win XP but does not work at all in Win 98.
: > : Private WithEvents objIExplorer As InternetExplorer
: > :
: > : I have to do it like this to get it to work in Win 98
: > : Dim objIExplorer As InternetExplorer But then I cant see when a user
: exit
: > my
: > : objIExplorer and than an error will show up when I try to open a link
in
: > the
: > : IE window that does not exist...
: > :
: > : What can I do about this and way does it not work in win 98?
: > :
: > : (This does not work at all with Private WithEvents objIExplorer As
: > : InternetExplorer)
: > : If objIExplorer Is Nothing Then
: > : Set objIExplorer = New InternetExplorer ' ******* Here is where
the
: > : Error will show up****
: > : With objIExplorer
: > : .AddressBar = True
: > : .MenuBar = True
: > : .StatusBar = True
: > : .ToolBar = True
: > : .Visible = True
: > : DoEvents
: > : End With
: > : End If
: > :
: > : Yours, Jonas
: > :
: > :
: >
: >
:
:
Jul 17 '05 #4
Knowledge Base

PRB: WithEvents Does Not Work with Remote AutomationPSS ID Number: 172312

Article Last Modified on 4/18/2003
--------------------------------------------------------------------------------
The information in this article applies to:
a.. Microsoft Visual Basic Control Creation Edition for Windows 5.0
b.. Microsoft Visual Basic Learning Edition for Windows 5.0
c.. Microsoft Visual Basic Professional Edition for Windows 5.0
d.. Microsoft Visual Basic Enterprise Edition for Windows 5.0

--------------------------------------------------------------------------------

This article was previously published under Q172312
SYMPTOMS
When attempting to raise a remote event across Remote Automation, the
following run-time error appears:

-2147467259(80004005) , Automation error
CAUSE
Remote Automation does not currently support the use of WithEvents.
RESOLUTION
To support remote events with Visual Basic 5.0, use DCOM instead of Remote
Automation. You can also use callbacks to simulate raising events remotely.
STATUS
This behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
Use the following steps on the server machine:

1.. Start Visual Basic 5.0 and create a new ActiveX EXE project.
2.. From the Project menu, selectProject properties and change the Project
name to "Projtest."
3.. Add a Class Module and change its name to "Testclass."
4.. In Testclass' Code window, input following code:
Public Event propchange(newv As String)
Private propt As String

Public Sub showfrm()
MsgBox "asdfl"

End Sub

Public Property Get testp() As String
testp = propt
End Property

Public Property Let testp(ByVal vNewValue As String)
propt = vNewValue
RaiseEvent propchange(propt)
End Property

5.. On the File menu, click "Make ProjTest.exe."
6.. Copy the corresponding .exe, .tlb, and .vbr files to the client
machine.
7.. Start the Automation Manager and the RemAuto Connection Manager to set
necessary server-side configuration for using Projtest.testclass for Remote
Automation.
Use the following steps on the client machine:

1.. Run Projtest.exe, which was copied from the Server side in the above
steps.
2.. Start the RemAuto Connection Manager to set necessary Client-side
configuration for using Projtest.testclass.
3.. Launch Visual Basic 5.0 and create a new Standard EXE project with a
standard form.
4.. From the Project menu, click References and select the "Projtest" box.
5.. In Form1's Code window, input following code:
Public WithEvents eventp As testclass

Private Sub eventp_propchange(newv As String)
MsgBox newv
End Sub

Private Sub Form_Load()
Dim a As New testclass
a.showfrm
Set eventp = a
a.testp = "test string"
End Sub

6.. Run the project and check if the Remote Automation connection is
correct, the message box should pop up on the server-side machine.
7.. Click OK to close the message box on the server-side machine.
Result
When the line "Set eventp = a" executes, you will get the following run-
time error:

-2147467259(80004005) , Automation error
Expected behavior
A message box should appear on the client-side machine because the server
raised the Propchange event.

NOTE: If both the client and the server are running on the same machine
(with local automation), you will see the expected behavior.
Keywords: kbprb KB172312
Technology: kbAudDeveloper kbVB500 kbVB500Search kbVBA500Search kbVBSearch
kbZNotKeyword2 kbZNotKeyword3 kbZNotKeyword6

--------------------------------------------------------------------------------

Send feedback to Microsoft

2003 Microsoft Corporation. All rights reserved.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"Jonas" <ba*******@hotmail.com> wrote in message
news:2V********************@newsc.telia.net...
: This is the error message:
:
: Run-time error '-2147023067 (80070725)':
: Automation error
:
:
:
: "Randy Birch" <rg************@mvps.org> skrev i meddelandet
: news:wA*******************@news04.bloor.is.net.cab le.rogers.com...
: > "does not work" is insufficient. What is the error message.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: > There's no place like 127.0.0.1
: >
: >
: > "Jonas" <ba*******@hotmail.com> wrote in message
: > news:ZY********************@newsb.telia.net...
: > : This works fine in Win XP but does not work at all in Win 98.
: > : Private WithEvents objIExplorer As InternetExplorer
: > :
: > : I have to do it like this to get it to work in Win 98
: > : Dim objIExplorer As InternetExplorer But then I cant see when a user
: exit
: > my
: > : objIExplorer and than an error will show up when I try to open a link
in
: > the
: > : IE window that does not exist...
: > :
: > : What can I do about this and way does it not work in win 98?
: > :
: > : (This does not work at all with Private WithEvents objIExplorer As
: > : InternetExplorer)
: > : If objIExplorer Is Nothing Then
: > : Set objIExplorer = New InternetExplorer ' ******* Here is where
the
: > : Error will show up****
: > : With objIExplorer
: > : .AddressBar = True
: > : .MenuBar = True
: > : .StatusBar = True
: > : .ToolBar = True
: > : .Visible = True
: > : DoEvents
: > : End With
: > : End If
: > :
: > : Yours, Jonas
: > :
: > :
: >
: >
:
:
Jul 17 '05 #5
*It is Jonas posting as BadOmen*

I don't really get this... I'm a newbe...
I don't have a server as far as I know...

I have installed Visual Studio 6.0 Professional Edition and using Visual
Basic 6 on Win 98.

I am using this:
Private WithEvents objIExplorer As InternetExplorer
To open a Internet explorer window and be able to know when the user exit
that window so I must make a new when an URL is pressed.

Is there a way of making it work?
"Randy Birch" <rg************@mvps.org> skrev i meddelandet
news:Ec*******************@news04.bloor.is.net.cab le.rogers.com...
Knowledge Base

PRB: WithEvents Does Not Work with Remote AutomationPSS ID Number: 172312

Article Last Modified on 4/18/2003
-------------------------------------------------------------------------- ------ The information in this article applies to:
a.. Microsoft Visual Basic Control Creation Edition for Windows 5.0
b.. Microsoft Visual Basic Learning Edition for Windows 5.0
c.. Microsoft Visual Basic Professional Edition for Windows 5.0
d.. Microsoft Visual Basic Enterprise Edition for Windows 5.0

-------------------------------------------------------------------------- ------
This article was previously published under Q172312
SYMPTOMS
When attempting to raise a remote event across Remote Automation, the
following run-time error appears:

-2147467259(80004005) , Automation error
CAUSE
Remote Automation does not currently support the use of WithEvents.
RESOLUTION
To support remote events with Visual Basic 5.0, use DCOM instead of Remote
Automation. You can also use callbacks to simulate raising events remotely. STATUS
This behavior is by design.
MORE INFORMATION
Steps to Reproduce Behavior
Use the following steps on the server machine:

1.. Start Visual Basic 5.0 and create a new ActiveX EXE project.
2.. From the Project menu, selectProject properties and change the Project name to "Projtest."
3.. Add a Class Module and change its name to "Testclass."
4.. In Testclass' Code window, input following code:
Public Event propchange(newv As String)
Private propt As String

Public Sub showfrm()
MsgBox "asdfl"

End Sub

Public Property Get testp() As String
testp = propt
End Property

Public Property Let testp(ByVal vNewValue As String)
propt = vNewValue
RaiseEvent propchange(propt)
End Property

5.. On the File menu, click "Make ProjTest.exe."
6.. Copy the corresponding .exe, .tlb, and .vbr files to the client
machine.
7.. Start the Automation Manager and the RemAuto Connection Manager to set necessary server-side configuration for using Projtest.testclass for Remote Automation.
Use the following steps on the client machine:

1.. Run Projtest.exe, which was copied from the Server side in the above
steps.
2.. Start the RemAuto Connection Manager to set necessary Client-side
configuration for using Projtest.testclass.
3.. Launch Visual Basic 5.0 and create a new Standard EXE project with a
standard form.
4.. From the Project menu, click References and select the "Projtest" box. 5.. In Form1's Code window, input following code:
Public WithEvents eventp As testclass

Private Sub eventp_propchange(newv As String)
MsgBox newv
End Sub

Private Sub Form_Load()
Dim a As New testclass
a.showfrm
Set eventp = a
a.testp = "test string"
End Sub

6.. Run the project and check if the Remote Automation connection is
correct, the message box should pop up on the server-side machine.
7.. Click OK to close the message box on the server-side machine.
Result
When the line "Set eventp = a" executes, you will get the following run-
time error:

-2147467259(80004005) , Automation error
Expected behavior
A message box should appear on the client-side machine because the server
raised the Propchange event.

NOTE: If both the client and the server are running on the same machine
(with local automation), you will see the expected behavior.
Keywords: kbprb KB172312
Technology: kbAudDeveloper kbVB500 kbVB500Search kbVBA500Search kbVBSearch
kbZNotKeyword2 kbZNotKeyword3 kbZNotKeyword6

-------------------------------------------------------------------------- ------
Send feedback to Microsoft

2003 Microsoft Corporation. All rights reserved.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"Jonas" <ba*******@hotmail.com> wrote in message
news:2V********************@newsc.telia.net...
: This is the error message:
:
: Run-time error '-2147023067 (80070725)':
: Automation error
:
:
:
: "Randy Birch" <rg************@mvps.org> skrev i meddelandet
: news:wA*******************@news04.bloor.is.net.cab le.rogers.com...
: > "does not work" is insufficient. What is the error message.
: >
: > --
: >
: > Randy Birch
: > MVP Visual Basic
: > http://vbnet.mvps.org/
: > Please respond only to the newsgroups so all can benefit.
: >
: > There's no place like 127.0.0.1
: >
: >
: > "Jonas" <ba*******@hotmail.com> wrote in message
: > news:ZY********************@newsb.telia.net...
: > : This works fine in Win XP but does not work at all in Win 98.
: > : Private WithEvents objIExplorer As InternetExplorer
: > :
: > : I have to do it like this to get it to work in Win 98
: > : Dim objIExplorer As InternetExplorer But then I cant see when a user
: exit
: > my
: > : objIExplorer and than an error will show up when I try to open a link in
: > the
: > : IE window that does not exist...
: > :
: > : What can I do about this and way does it not work in win 98?
: > :
: > : (This does not work at all with Private WithEvents objIExplorer As
: > : InternetExplorer)
: > : If objIExplorer Is Nothing Then
: > : Set objIExplorer = New InternetExplorer ' ******* Here is where
the
: > : Error will show up****
: > : With objIExplorer
: > : .AddressBar = True
: > : .MenuBar = True
: > : .StatusBar = True
: > : .ToolBar = True
: > : .Visible = True
: > : DoEvents
: > : End With
: > : End If
: > :
: > : Yours, Jonas
: > :
: > :
: >
: >
:
:

Jul 17 '05 #6
What that's basically saying is open your dcom config app and ensure dcom is
set up to allow this.

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"BadOmen" <ba*******@hotmail.com> wrote in message
news:j%********************@newsc.telia.net...
: *It is Jonas posting as BadOmen*
:
: I don't really get this... I'm a newbe...
: I don't have a server as far as I know...
:
: I have installed Visual Studio 6.0 Professional Edition and using Visual
: Basic 6 on Win 98.
:
: I am using this:
: Private WithEvents objIExplorer As InternetExplorer
: To open a Internet explorer window and be able to know when the user exit
: that window so I must make a new when an URL is pressed.
:
: Is there a way of making it work?
Jul 17 '05 #7

"Randy Birch" <rg************@mvps.org> skrev i meddelandet
news:0b*******************@news04.bloor.is.net.cab le.rogers.com...
What that's basically saying is open your dcom config app and ensure dcom is set up to allow this.

I don't know of a dcom config app... What is that...and what is dcom...

I'm really new to this... =)

--

Randy Birch
MVP Visual Basic
http://vbnet.mvps.org/
Please respond only to the newsgroups so all can benefit.

There's no place like 127.0.0.1
"BadOmen" <ba*******@hotmail.com> wrote in message
news:j%********************@newsc.telia.net...
: *It is Jonas posting as BadOmen*
:
: I don't really get this... I'm a newbe...
: I don't have a server as far as I know...
:
: I have installed Visual Studio 6.0 Professional Edition and using Visual : Basic 6 on Win 98.
:
: I am using this:
: Private WithEvents objIExplorer As InternetExplorer
: To open a Internet explorer window and be able to know when the user exit : that window so I must make a new when an URL is pressed.
:
: Is there a way of making it work?

Jul 17 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Jakob Bengtsson | last post by:
Hi, I have a form (which cannot be serialized). In the form's code I declare an object like this (never mind the object nor class name, it's for illustration only): Private WithEvents...
1
by: Rob Smeets | last post by:
Hi you Gurus, I would like your help with my 'challenge' ;-) Any help or advice would be greatly appriciated!! I've created a Class wich retrieves FTP files. In that Class there are several...
0
by: Macadair | last post by:
I develop mid-range multi-user applications for a large site. Currently Win98 and Office97 are the standards used however we are slowly moving to WinXP. Due to the site upgrade cost, we are...
8
by: mheden | last post by:
Hello all, I'm using an Access 97 front-end with a SQL Server 2000 back-end. One particular bit of code runs a stored procedure to obtain a rowcount from one of the back-end tables. This works...
5
by: Bradley Grant | last post by:
I am trying to write a program to access a device through USB port, there is some Visual Basic program examples that work with the device, but I am trying to write a program using C#, no luck yet,...
4
by: Brian Lowe | last post by:
I have several aspx pages that include a couple of asp:placeholder controls, an example is myPage.aspx. The page inherits from a custom class 'myClass' which inherits System.Web.UI.Page which...
8
by: Bob Day | last post by:
Using VS 2003, VB.NET, MSDE If an event is raised in a class that was NOT instantiated with the WithEvents key word, is that event effectively ignored? Or, another way to phrase the question,...
0
by: sexy-trousers | last post by:
Is there a specific OS requirement for a win forms client written in VB.Net utilizing .net 1.1 that uses WSE2? Is the requirement to simply have .net 1.1. installed on the platform? i.e. the...
3
by: Vemund Halvorsen | last post by:
Hi, Im having some trouble getting Addhandler to work. Using withevents everything is working fine. But with AddHandler I get no callback. The code below works fin if I declare _tcp as a...
1
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.