Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

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


View products that this article applies to.

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

↑ Back to the top


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)

↑ Back to the top


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.

↑ Back to the top


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.

↑ Back to the top


Article Info
Article ID : 232332
Revision : 5
Created on : 1/1/0001
Published on : 1/1/0001
Exists online : False
Views : 238