Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unexpected Internal error when calling a function (Excel/MapPoint)

Hi !

I am having an inconsistent problem calling a function from Exce
(2000) VBA, while working with the Microsoft Mappoint Object Model.
have posted this question in the Mappoint forum as well, but so fa
noone has been able to help me out and I am posting here because
think the problem might not be specifically related to MapPoint, but t
(Excel) VBA in general.

In my code I am using a method called "CallMatchMethod". This metho
calls a function (in the code below the function called "MatchFirst"
when MapPoint cannot match geographical data in the recordset.

The strange thing is that this works regularly without any problems
but from time calling the function generates an error "Unexpecte
internal error (4000)". When debugging I see that the code neve
actually 'reaches' the function and generates the internal error.

This is the code I use (in a form). Below that is the Function bein
called. objRS is a recordset where several records are unmatche
(objRS.IsMatched < True).

MAIN CODE


Code
-------------------

Do While Not objRS.EOF 'Loop through recordset
If objRS.IsMatched < True Then 'When record can't be matched
objRS.CallMatchMethod "MatchFirst", Me
End If
objRS.MoveNext
Loop

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

FUNCTION

Code
-------------------

Public Function MatchFirst(Name As String, _
Results As FindResults) _
As Long

MatchFirst = 1

End Function

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


Can someone help ?

Thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Unexpected Internal error when calling a function (Excel/MapPoint)

Anyone ? Please ?

--
Message posted from http://www.ExcelForum.com

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 1 February 12th 09 04:18 AM
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 0 February 12th 09 03:35 AM
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 0 February 12th 09 03:19 AM
Solver Error - an unexpected internal error has occurred Steve Excel Discussion (Misc queries) 0 February 12th 09 03:19 AM
WinXP: Solver: An unexpected internal error occurred ... Ken Dahlberg Excel Programming 1 May 6th 04 05:35 PM


All times are GMT +1. The time now is 04:03 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"