Switching language and direction at the same time

A

amanda.toren

I'm using Excel (Office 2003) on XP 2000. Is there a way to have Excel remember what language a particular cell was in so that I don't have to switch the language bar every time I need to correct a cell in a multi-language document? Thanks

Amanda
 
B

Bernie Deitrick

Amanda,

I don't have a multi-language setup, but you could try this. Record a macro where you switch the
language bar, once in each direction. Then use that code to modify this event code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
'Code to change to A1's language bar
MsgBox "I just changed to A1's language bar"
Else
'Code to change to the other cells' language bar
MsgBox "I just changed to the other cells' language bar"
End If
End Sub

Copy the code, right-click on the sheet tab, select "View Code" and paste the code in the window
that appears.

If you have trouble, post the macro that you record when you switch language bars.

HTH,
Bernie
MS Excel MVP
 
A

amanda.toren

Thanks, that looks like it'll do the trick.

----- Original Message -----
Amanda,

I don't have a multi-language setup, but you could try this. Record a macro where you switch the
language bar, once in each direction. Then use that code to modify this event code:

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
If Not Intersect(Target, Range("A1")) Is Nothing Then
'Code to change to A1's language bar
MsgBox "I just changed to A1's language bar"
Else
'Code to change to the other cells' language bar
MsgBox "I just changed to the other cells' language bar"
End If
End Sub

Copy the code, right-click on the sheet tab, select "View Code" and paste the code in the window
that appears.

If you have trouble, post the macro that you record when you switch language bars.

HTH,
Bernie
MS Excel MVP
 
Top