-
Trapping for error using MapPoint
I am using the code below to generate a map using MapPoint in my VB6 (SP6) app. Works fine till I hit an address it can not find line one with a PO BOX. Problem is I can not check every possible combination. Is there a way to trap the results of the findaddress so I do not fall thru the code which fails?
If SavSLCust_ShipToAddress1 <> "" And _
SavSLCust_ShipToCity <> "" And _
SavSLCust_ShipToState <> "" Then
FindPOBox = InStr(1, SavSLCust_ShipToAddress1, "PO BOX", vbTextCompare)
FindP_OBox = InStr(1, SavSLCust_ShipToAddress1, "P O BOX", vbTextCompare)
FindPOPeriodBox = InStr(1, SavSLCust_ShipToAddress1, "P.O. BOX", vbTextCompare)
FindPOPeriod2Box = InStr(1, SavSLCust_ShipToAddress1, "P.O.BOX", vbTextCompare)
If FindPOBox = 0 And _
FindP_OBox = 0 And _
FindPOPeriodBox = 0 And _
FindPOPeriodBox2 = 0 Then
Set objGenETktMap = SMARTLynxGenerateETicket.GenerateETicketMap.NewMap(geoMapNorthAmerica)
Set objGenETktLoc = objGenETktMap.FindAddressResults( _
SavSLCust_ShipToAddress1, SavSLCust_ShipToCity, , SavSLCust_ShipToState)(1)
Set objGenETktPin = objGenETktMap.AddPushpin(objGenETktLoc, SavSLCust_ShipToAddress1)
Similar Threads
-
By Jigar in forum ASP.NET
Replies: 0
Last Post: 06-01-2005, 12:56 PM
-
By Rohit Wason in forum VB Classic
Replies: 2
Last Post: 08-05-2002, 04:07 AM
-
By Mark Metze in forum VB Classic
Replies: 6
Last Post: 07-31-2000, 05:45 PM
-
By Mark Metze in forum VB Classic
Replies: 0
Last Post: 07-31-2000, 01:46 PM
-
By Chris in forum VB Classic
Replies: 0
Last Post: 06-30-2000, 03:25 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks