The information in this article applies to:
SYMPTOMSIn Microsoft Excel, when you run a macro that you recorded while you inserted a map object on your worksheet, you may receive one of the following error messages: -or-
CAUSEThis problem occurs because when you turn on the macro recorder and insert a map object, the incorrect commands are recorded. If you do not record the action of entering the data on the worksheet and then creating the map from this data, you receive the run-time error '1004' when you run the macro because the recorded macro contains a line similar to the following:
This line causes the error message because the drawing object Marquee does
not exist when you run the macro.
If you do record the process of entering the data and then creating the map, you receive the run-time error '1000' when you run the macro because the recorded macro contains lines similar to the following:
When you run the macro, the first of these lines returns the error message
because the Width property of the Range object is a Read Only property, and
a range of cells is selected when this command runs.
RESOLUTIONTo work around this problem, you can modify your recorded macro to appear similar to the following example:
Note that this procedure creates a map object on top of the data on the
worksheet. If there are multiple maps available for the data that you use
to create the map, the Multiple Maps Available dialog box appears when you
run this macro, and you must select a map in order for the macro to
continue.
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. STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. MORE INFORMATIONFor additional information, please see the following article(s) in the Microsoft Knowledge Base: Q131930 XL7: Data Map Objects Limited to RefreshMap Command REFERENCESFor more information about using the Visual Basic Width property, click the Index tab in the Microsoft Excel Help, type the following text Width propertyand then double-click the selected text to go to the "Width Property" topic. Additional query words:
Keywords : kbprg xlwin |
Last Reviewed: October 25, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |