Validation.IMEMode Property

Excel Developer Reference

Returns or sets the description of the Japanese input rules. Can be one of the XlIMEMode constants listed in the following table. Read/write Long.

Syntax

expression.IMEMode

expression   A variable that represents a Validation object.

Remarks

Constant Description
xlIMEModeAlpha Half-width alphanumeric
xlIMEModeAlphaFull Full-width alphanumeric
xlIMEModeDisable Disable
xlIMEModeHiragana Hiragana
xlIMEModeKatakana Katakana
xlIMEModeKatakanaHalf Katakana (half-width)
xlIMEModeNoControl No control
xlIMEModeOff Off (English mode)
xlIMEModeOn On

Note that this property can be set only when Japanese language support has been installed and selected.

Example

This example sets the data input rule for cell E5.

Visual Basic for Applications
  With Range("E5").Validation
    .Add Type:=xlValidateWholeNumber, _
        AlertStyle:= xlValidAlertStop, _
        Operator:=xlBetween, Formula1:="5", Formula2:="10"
    .InputTitle = "seisuuchiseisuuchiseisuuchi"
    .ErrorTitle = "seisuuchiseisuuchiseisuuchi"
    .InputMessage = "5 karakara 10 noseisuuseisuuonyuuryokunyuuryokushiteshitekudasaikudasaikudasaikudasai."
    .ErrorMessage = "nyuuryokunyuuryokudekirunowadekirunowadekirunowadekirunowadekirunowa 5 karakara 10 madenomadenomadenonedesudesu."
    .IMEMode = xlIMEModeAlpha
End With

See Also