XL2000: Bidi Excel5 VBA Font Properties Are Not Mapped to New Ones

ID: Q232332


The information in this article applies to:
  • Microsoft Excel 2000

NOTE: This article discusses complex scripts functionality. Complex scripts functionality is available when you use the Office Language Settings tool to enable a language, such as Arabic or Hebrew, that requires this functionality. For more information about multilingual features, click Microsoft <your Office product> Help on the Help menu, type multilingual features in the Office Assistant or the Answer Wizard, and then click Search to view the topics returned.

SYMPTOMS

When you type Microsoft Visual Basic for Applications code in a module sheet and attempt to run the code, you receive the following error message:

Run-time error '438':
Object doesn't support this property or method


CAUSE

Your code contains one of the following bidirectional (BiDi) Visual Basic for Applications dual font properties or methods that are no longer supported after Microsoft Excel version 5.0:

  • xlDefault
  • xlArabic
  • xlEnglish
  • xlDialogOptionsArabic
  • BidiName
  • BidiFontStyle
  • BidiSize
  • StandardBidiFont
  • StandardBidiFontSize
  • xlLTR (when used with Object.DisplayRightToLeft where Object is either ActiveSheet or Activewindow)
  • xlRTL (when used with Object.DisplayRightToLeft where Object is either ActiveSheet or Activewindow)
  • xlContext (when used with Object.HorizontalAlignment where Object is referencing a Cell range)


WORKAROUND

Do not create new workbooks that reference bidirectional dual font properties that are no longer supported.

For existing Excel 5.0 workbooks with bidirectional dual font references, convert the file into a Microsoft Excel 2000 workbook by opening it in Excel 2000. During conversion, Excel maps bidirectional dual font properties to font properties that can be saved.


MORE INFORMATION

The following table describes how Microsoft Excel 2000 converts the legacy bidirectional dual font properties:


   From                    To
   ----------------------------------------
   xlDefault               xlContext
   xlArabic                xlBidi
   xlEnglish               xlLatin
   xlDialogOptionsArabic   xlDialogOptionsME
   BidiName                Name
   BidiFontStyle           FontStyle
   BidiSize                Size
   StandardBidiFont        StandardFont
   StandardBidiFontSize    StandardFontSize 
NOTES:

This conversion occurs only while migrating from Excel 95 and Excel 5.x to Excel 97 or Excel 2000. Excel performs the conversion to preserve functionality and to enable these projects to run without errors. Make sure not to save the projects back in an Excel 95 and 5.x format and do not attempt to run them.

You must modify the following conversions manually:
  • Change Object.DisplayRightToLeft = xlLTR to Object.DisplayRightToLeft = FALSE (where Object is either ActiveSheet or Activewindow).


  • Change Object.DisplayRightToLeft = xlRTL to Object.DisplayRightToLeft = TRUE (where Object is either ActiveSheet or Activewindow).


  • Change Object.HorizontalAlignment = xlContext to Object.HorizontalAlignment = xlGeneral, if Object was referencing a Cell range, otherwise change xlContext to XlLTR or xlRTL.


Additional query words: vba font properties bi directional bi-directional left-to-right

Keywords : kbBidi
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: December 2, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.