XL: Data Map Objects Are Not Automatically Updated

Last reviewed: May 27, 1997
Article ID: Q131928

The information in this article applies to:

  • Microsoft Excel for Windows 95, version 7.0
  • Microsoft Excel 97 for Windows

SUMMARY

Unlike other objects, such as charts, Data Map objects are not automatically updated when associated data is changed.

This behavior is by design of Data Map, because it may take a very long time to update Data Map objects if they are associated with large amounts of data.

MORE INFORMATION

Data Map is a new OLE object included with Microsoft Excel for Windows 95, version 7.0 and higher; Data Map allows you to create a geographical representation of data.

A Data Map object can be updated either manually (by activating the object and clicking the Update button on the object) or programmatically (by creating a Visual Basic for Applications procedure).

The following sample Visual Basic for Applications macro updates a Data Map object on a Microsoft Excel worksheet.

Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

Sample 1 (Microsoft Excel 95)

Sub Update_DataMap_Object()

   'Assign DataMap Object name to a Variable
   MapName = "Picture 1"

   'Update DataMap Object
   ActiveSheet.OLEObjects(MapName).Object.Refreshmap

End Sub

Sample 2 (Microsoft Excel 97)

Sub Update_DataMap_Object()

   'Assign DataMap Object name to a Variable
   MapName = "Picture 1"

   'Update DataMap Object
   Activesheet.OLEObjects(MapName).Object.Refresh

End Sub


Additional reference words: 7.0
Keywords : kbcode kbprg kbtool
Version : 7.00
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 27, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.