Error: 80040108 after 380 CreateObject("MAPI.Session")
Function MAPI_Test2()
Dim i As Integer
Dim MySession As MAPI.Session
i = 0
While (i < 2000)
Set MySession = CreateObject("MAPI.Session")
Debug.Print i
i = i + 1
Set MySession = Nothing
DoEvents
Wend
End Function
Any ideas?
Best regards
Ottar 4 5004
You are Dim'ing MySeesion as MAPI.Session which you cannot do without
setting a reference. If you want to use early binding, set a reference. If
you want to use late binding, change your code to:
Dim MySession As Object
It should run fine, if you do that.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads: http://www.datastrat.com http://www.mvps.org/access
"Ottar" <la*****@earthling.net> wrote in message
news:43*************************@posting.google.co m... Error: 80040108 after 380 CreateObject("MAPI.Session")
Function MAPI_Test2() Dim i As Integer Dim MySession As MAPI.Session
i = 0 While (i < 2000) Set MySession = CreateObject("MAPI.Session") Debug.Print i i = i + 1 Set MySession = Nothing DoEvents Wend End Function
Any ideas?
Best regards Ottar
No success unfornunatly, tried Dim MySession As Object same thing happens.
The code: Dim MySession As MAPI.Session Set MySession = CreateObject("MAPI.Session")
Is taken directly from Microsoft MSDN articles.
Any other suggestions? Could you try it on your PC? I've tried it on 3 PC's
with same result.
Best regards
Ottar
"Arvin Meyer" <a@m.com> wrote in message
news:#3**************@TK2MSFTNGP09.phx.gbl... You are Dim'ing MySeesion as MAPI.Session which you cannot do without setting a reference. If you want to use early binding, set a reference. If you want to use late binding, change your code to:
Dim MySession As Object
It should run fine, if you do that. -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access
"Ottar" <la*****@earthling.net> wrote in message news:43*************************@posting.google.co m... Error: 80040108 after 380 CreateObject("MAPI.Session")
Function MAPI_Test2() Dim i As Integer Dim MySession As MAPI.Session
i = 0 While (i < 2000) Set MySession = CreateObject("MAPI.Session") Debug.Print i i = i + 1 Set MySession = Nothing DoEvents Wend End Function
Any ideas?
Best regards Ottar
No success unfornunatly, tried Dim MySession As Object; same thing happens.
The code: Dim MySession As MAPI.Session Set MySession = CreateObject("MAPI.Session")
Is taken directly from Microsoft MSDN articles.
Any other suggestions? Could you try it on your PC? I've tried it on 3 PC's
with same result.
Best regards
Ottar
"Arvin Meyer" <a@m.com> wrote in message news:<#3**************@TK2MSFTNGP09.phx.gbl>... You are Dim'ing MySeesion as MAPI.Session which you cannot do without setting a reference. If you want to use early binding, set a reference. If you want to use late binding, change your code to:
Dim MySession As Object
It should run fine, if you do that. -- Arvin Meyer, MCP, MVP Microsoft Access Free Access downloads: http://www.datastrat.com http://www.mvps.org/access
"Ottar" <la*****@earthling.net> wrote in message news:43*************************@posting.google.co m... Error: 80040108 after 380 CreateObject("MAPI.Session")
Function MAPI_Test2() Dim i As Integer Dim MySession As MAPI.Session
i = 0 While (i < 2000) Set MySession = CreateObject("MAPI.Session") Debug.Print i i = i + 1 Set MySession = Nothing DoEvents Wend End Function
Any ideas?
Best regards Ottar
"Ottar L. Osen" <la*************@earthling.net> wrote in message
news:O3**************@TK2MSFTNGP12.phx.gbl... No success unfornunatly, tried Dim MySession As Object same thing happens.
The code: Dim MySession As MAPI.Session Set MySession = CreateObject("MAPI.Session") Is taken directly from Microsoft MSDN articles.
Any other suggestions? Could you try it on your PC? I've tried it on 3
PC's with same result.
I did try it on my PC, and it worked with the one change I showed.
I was able to generate 2000 counts in the debug window. Keep in mind that I
have a GB of memory, so I probably have enough to allocate to all those
instances of MAPI.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads: http://www.datastrat.com http://www.mvps.org/access This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Fie Fie Niles |
last post by:
I have IIS installed on XP Professional workstation machine. I have an ASP
page that open connection to an Access database, then when trying to update
the database, it gave me the error "cannot...
|
by: bajopalabra |
last post by:
hi
session("myVar") = rs.getRows( )
don't work when number of records
is greater than 10
does anybody know WHY ???
is it a Session object limitation ???
thanks
|
by: Ottar |
last post by:
I've made a program sorting incomming mail in public folder.
The function runs every minute by using the form.timer event.
In Access XP it runs for weeks, no problem. Access 2003 runs the same...
|
by: dee |
last post by:
Hi
My code complies the following line:
Session("passed") = 1
but puts wiggly error line under the second Session("passed") in the
following expression:
Session("passed") = Session("passed") +...
|
by: thomson |
last post by:
Hi,
i create a session variable in C# as follows Session ,
but iam not able to access the variable in VB.net
like intmode=Session("var");
Why is that ?
Regards
|
by: Paul |
last post by:
Hi All,
In my application, I wished to check certain things on each page
load, so rather than paste the same code in each pages constructor, I
thought it would be more logical to inherit from...
|
by: PShark |
last post by:
Hi
I have a VB6 app that uses MAPI to send and receive emails. My users are able to use the app to send emails successfully, but when there are new emails in the mailbox, the program opens the email...
|
by: patelxxx |
last post by:
Hi Guy's,
I'm getting the error: "Username or password did not match" BEFORE I even enter a username and password, can someone help?
1) The site I'm accessing is:...
|
by: Kosmos |
last post by:
Hey ya'll...I can't seem to figure out why I'm getting this error message, but it all started when I added the new line of code with the recSet5.AddNew --- when I ran the first line, the logic worked...
|
by: DolphinDB |
last post by:
Tired of spending countless mintues downsampling your data? Look no further!
In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: isladogs |
last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM).
In this month's session, we are pleased to welcome back...
|
by: jfyes |
last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
|
by: ArrayDB |
last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
|
by: PapaRatzi |
last post by:
Hello,
I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
|
by: Defcon1945 |
last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
|
by: af34tf |
last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome former...
| |