Microsoft KB Archive/131928

= Data Map Objects Are Not Automatically Updated =

Article ID: 131928

Article Last Modified on 8/15/2005

-

APPLIES TO


 * Microsoft Excel 97 Standard Edition
 * Microsoft Excel 95 Standard Edition

-



This article was previously published under Q131928





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 query words: 7.0 XL

Keywords: KB131928

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.