Welcome to MapForums!

Register, sign in, or use Facebook Connect above to join in and participate in the forum.

When you are signed in, this message, the ads in this row, and the red-underlined link ads all go away.

Subscribe to receive our newsletter.
Subscribe Unsubscribe
Results 1 to 4 of 4

Closing Without Saving A territory map

This is a discussion on Closing Without Saving A territory map within the MapPoint Desktop Discussion forums, part of the Map Forums category; I am using the following to close without saving. MappointControl1.ActiveMap.Saved = True MappointControl1.CloseMap The above works great except when a ...

  1. #1
    Yazzy is offline Junior Member Yellow Belt
    Join Date
    Dec 2004
    Posts
    25

    Closing Without Saving A territory map

    I am using the following to close without saving.

    MappointControl1.ActiveMap.Saved = True
    MappointControl1.CloseMap

    The above works great except when a territory map has been opened. Then on closing we are getting the 'Save Map' popup which should be disabled. The code I am using to open the territory map is listed below.

    Set objmap = MappointControl1.ActiveMap

    With objmap.DataSets
    Set objDataSet = .ImportTerritories(CSVFileName, , geoCountryUnitedKingdom, , geoImportExcelA1)
    End With

    I have tried using the 'Quit' and I am still getting the window popup.

    So my questions are

    1) Is there anything special about how to close a territory

    2) I was thinking about deleting the dataset before closing the map but the code listed below comes up the error;

    'The requested set does not existbjDataSet.Delete'


    Set objDataSet = objmap.DataSets.ImportData(CSVFileName)
    Set objRecordset = objDataSet.QueryAllRecords

    For Each objDataSet In objmap.DataSets
    objDataSet.Delete
    Next


    Thanks in advance

  2. #2
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    I have no idea wy it not should word with a terrain map, this looks like a bug to me. However you could do a few workarounds.

    - use SaveAs() and save the map
    - send a 'N' key to the window

    I think the first one is the most proper to do I should save it then delete that file.

  3. #3
    1.21Gigawatts is offline Junior Member White Belt
    Join Date
    Apr 2005
    Posts
    8
    I have found the MSDN documentation for the BeforeClose event to be incorrect. It says "Occurs before the map closes. If the map has been changed, this event occurs before the user is asked to save changes." I found that this event occurs after the user is asked to save changes, which defeats the whole purpose of it. How frustrating!!!

    MSDN documentation http://msdn.microsoft.com/library/de...eforeClose.asp

  4. #4
    Wilfried is offline Senior Member Black Belt
    Join Date
    Nov 2004
    Location
    Belgium
    Posts
    2,433
    Hi,

    Indeed frustrating ! However I did not ever used one of these events. I set the closed to true when user colse map. there s a lot of events to react on withou using the mapoont ones.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. MapPoint crashs after closing the application
    By Elbarto in forum MapPoint Desktop Discussion
    Replies: 12
    Last Post: 12-30-2006, 10:47 PM
  2. HELP!!! Saving map and pushpins...
    By phrozzy in forum MapPoint Desktop Discussion
    Replies: 2
    Last Post: 05-30-2006, 01:54 PM
  3. Disabling closing of MapPoint?
    By MD2000 in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 05-09-2005, 05:57 PM
  4. Closing: MapPoint process stilll running
    By MD2000 in forum MapPoint Desktop Discussion
    Replies: 4
    Last Post: 04-29-2005, 09:58 AM
  5. Closing without saving
    By Mudrover in forum MapPoint Desktop Discussion
    Replies: 1
    Last Post: 01-30-2005, 08:49 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27