Community of VE/MapPoint Users and Developers
This is a discussion on Disable close button within the Development forums, part of the MapPoint 2006/2009 Discussion category; Is there a way to disable the Close button when opening MapPoint via VB/VBA so that the user cannot close ...
| |||||||
| Register | Blogs | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| Disable close button Basically, I do this in VBA: 1. Instantiate MP as an app 2. Create a new route 3. Populate the route with Waypoints 4. Allow the user to modify the order of Waypoints. 5. In my app, ask the user to approve/discard the new stop order. 6. If approved, update records in my DB to match the new stop order. 7. Close MP (via VBA). The problem comes when the user closes MP manually anywhere between #3 and #7, and then I have to trap a variety of errors that can occur as a result (e.g. MP is no longer open when my app references the ListPosition property of a Waypoint). |
| |||
| Re: Disable close button
That was my first attempt. I suppose I should have been more accurate. This is actually VBA in Access, not VB itself, and here is a snippet from the MP2009 help file: "In MapPoint 2009, the MapPoint Control is supported only in Visual Basic 6.0. Consequently, the MapPoint Control is not supported in Visual Basic for Applications" Being stubborn, I tried anyway and found that I can add the reference but am unablel to insert it onto a form in Access, so I am stuck with the MP Object Library. This is my first attempt at integrating MP with Access, so I am guessing that the Map Control may have been available with earlier version of MapPoint. |
| |||
| Re: Disable close button
Something that would work just as well would be to capture the processID of MapPoint when it is instantiated in VBA. Then I could check to see if that process is still active before running any code that assumes it is running and present the user with a better message than the system error messages about objects not found, etc. |
| ||||
| Re: Disable close button
There are some examples of using MapPoint in an Access form at -- MapPoint Articles - MP2K Magazine Search for "access" on this page, articles with Access examples should have Access in the title. It's been a while, but in particular, take a look at John Washenberger's article and my P.F. Chang's article. hope this helps, Eric
__________________ |
![]() |
| Tags |
| button, close, disable |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
| |
| ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How can I hide or disable the optimisation button? | stephenmillington | MapPoint 2006/2009 Discussion | 0 | 08-30-2005 06:18 AM |
| Remove Close Button | Dazzer | MapPoint 2006/2009 Discussion | 0 | 04-01-2004 06:56 AM |
| Disable left mouse button | dearmhr | MapPoint 2006/2009 Discussion | 0 | 12-22-2003 11:48 AM |
| Disable Right mouse button | Fisherman´s Friend | MapPoint 2006/2009 Discussion | 2 | 12-17-2003 09:48 AM |
| Disable right mouse button | Anonymous | MapPoint 2006/2009 Discussion | 3 | 09-10-2003 06:09 AM |