MapPoint Forums

MapForums

Community of VE/MapPoint Users and Developers




Closing Without Saving A territory map

This is a discussion on Closing Without Saving A territory map within the MapPoint 2006/2009 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 ...


Go Back   MapPoint Forums > Map Forums > MapPoint 2006/2009 Discussion

Register Blogs FAQ Members List Calendar Search Today's Posts Mark Forums Read



Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 04-25-2005
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #2 (permalink)  
Old 04-26-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3 (permalink)  
Old 04-26-2005
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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4 (permalink)  
Old 04-27-2005
Senior Member
Black Belt
 
Join Date: Nov 2004
Posts: 2,112
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.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
closing, map, saving, territory


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
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
MapPoint crashs after closing the application Elbarto MapPoint 2006/2009 Discussion 12 12-30-2006 10:47 PM
HELP!!! Saving map and pushpins... phrozzy MapPoint 2006/2009 Discussion 2 05-30-2006 01:54 PM
Disabling closing of MapPoint? MD2000 MapPoint 2006/2009 Discussion 1 05-09-2005 05:57 PM
Closing: MapPoint process stilll running MD2000 MapPoint 2006/2009 Discussion 4 04-29-2005 09:58 AM
Closing without saving Mudrover MapPoint 2006/2009 Discussion 1 01-30-2005 08:49 AM


All times are GMT -5. The time now is 03:36 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0
MP2K Magazine
Visitor Map


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 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54