Microsoft KB Archive/180098

= XL2000: VBA Macro Behavior Is Different from Excel 5.0 or 7.0 =

Article ID: 180098

Article Last Modified on 10/11/2006

-

APPLIES TO


 * Microsoft Excel 2000 Standard Edition

-



This article was previously published under Q180098





SUMMARY
When you run a Microsoft Visual Basic for Applications macro or procedure in Microsoft Excel 2000, the way the macro or procedure behaves may be different from the way it behaves in earlier versions of Excel. This may be true for any of the following reasons:


 * The architecture of Excel 2000 is somewhat different from the architecture that is used in earlier versions of Excel. Some elements (for example, menu bars and toolbars) are greatly enhanced in Excel 2000. As a result, Visual Basic code that interacts with these elements may work differently.
 * Excel 2000 corrects some problems that are present in earlier versions of Excel. As a result, Visual Basic code that works in earlier versions of Excel may work differently in Excel 2000.
 * Because all of the Microsoft Office programs include Visual Basic for Applications, the Visual Basic environment in Excel includes changes that accommodate the new programs and provide consistent behavior in all programs. As a result, code that uses automation or other cross-product functionality may work differently in Microsoft Excel 2000.
 * Microsoft realizes the importance of minimizing the amount of effort that is required to use Visual Basic macros and procedures in Excel. Excel 2000 is designed to be compatible with earlier versions of Microsoft Excel; however, in some cases, it may be necessary to modify your code so that it works in Excel 2000.



MORE INFORMATION
Modifying your code so that it works with Excel 2000 usually requires making only a few minor changes. The following is a list of articles in the Microsoft Knowledge Base that address compatibility issues in Excel 2000. Wherever possible, the articles contain the information you need to modify Visual Basic macros and procedures so they function in both Excel 2000 and in earlier versions of Microsoft Excel.

213604 XL2000: Cannot Move or Copy Sheet After Last Sheet

213603 XL2000: Overflow Error Occurs When Using Err Object

213602 XL2000: CreateObject and GetObject Work Differently

213591 XL2000: Macro Stops Running When Its Workbook Is Closed

213589 XL2000: "Type Mismatch" Comparing String Variable to Boolean

213588 XL2000: Styles("X").Parent Different Than in Earlier Versions of Excel

213567 XL2000: ParamArrays Are Always Zero-Based

213563 XL2000: Cannot Make Changes to Some Shortcut Menus

213562 XL2000: No Automatic Type Coercion Between Variable Types

213561 XL2000: Problems Disabling and Enabling Shortcut Menus

213560 XL2000: Limitations for Naming Visual Basic Modules

213556 XL2000: Error When Passing an Array Value Between Macros

213554 XL2000: "Bad DLL Calling Convention" When Running a Macro

213547 XL2000: Cannot Programmatically Close Referenced Workbook

213543 XL2000: Structure and Windows Arguments of Protect Method

213542 XL2000: Range.PasteSpecial Changes Selection

213541 XL2000: Input # Statement Does Not Retain Trailing Spaces

213540 XL2000: Run-time Error '1004' Accessing Locally Defined Name

213537 XL2000: Redraw Problem Changing Visibility of Object on Dialog

213532 XL2000: Auto_Close Macros Run When You Use Application.Quit

213530 XL2000: Error Adding or Deleting a Menu Command in a Macro

211917 XL2000: Page Setup Command Does Not Exist in Modules

213716 XL2000: Visible Property does not Apply to All CommandBars

211863 XL2000: Some Properties and Methods Are Missing in Object Browser

213705 XL2000: Can't Tile Windows with Macro If a Window Is Minimized

213703 XL2000: Error Applying Comment When Worksheets Are Grouped

213546 XL2000: Parentheses Around Object May Dereference the Object

213539 XL2000: Drawing Objects Behave Differently when Clicked

213538 XL2000: Pointer is an Hourglass When You Display a Message Box

213536 XL2000: Error Changing Order of Option Buttons on a Dialog Sheet

213544 XL2000: How to Delete Cells with a For Each...Next Loop

213557 XL2000: Cannot Edit Text Box with Unlocked Text

211499 XL2000: Text is Truncated in a Text Box with Rounded Corners

213565 XL2000: Error When Invalid Characters in Drawing Object Name

213564 XL2000: ParamArray Must be Declared as an Array of Variant

213579 XL2000: Select Method May Select More Cells Than Expected

213573 XL2000: Using "Checked", "Gray", and "Unchecked" in Macros

213570 XL2000: Reference to DAO 3.0 Changes to DAO 3.5 When File Opened

213569 XL2000: Menu Added in Wrong Position on Menu Bar

213568 XL2000: Cannot Paste Array Formula in its Original Cell

213587 XL2000: Cannot Add Macros to the Tools Menu

213783 XL2000: Compile Error Passing ParamArray

213577 XL2000: "ActiveX Component Can't Create Object" Error Using DAO 3.0

213606 XL2000: Excel Hangs When You Programmatically Save a Workbook

211552 XL2000: Attached Toolbar Is Not Saved in 5.0/95 File Format

213605 XL2000: Named Arguments Are Not Supported with DAO

Additional query words: subroutine vba code fail error halt message convert conversion XL2000

Keywords: kbhowto kbprogramming KB180098

-

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

© Microsoft Corporation. All rights reserved.