View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Gord Dibben Gord Dibben is offline
external usenet poster
 
Posts: 22,906
Default AutoCorrect Error in (my?) Excel

Can't see your Workbook_Open code that builds the Autocorrect list, so hard to
tell what's going on.

If all you want is to convert Lower case entries to Upper case as you type, use
this event code in the worksheet module.

Private Sub Worksheet_Change(ByVal Target As Excel.Range)
If Target.Column 256 Then Exit Sub
On Error GoTo ErrHandler
Application.EnableEvents = False
Target.Formula = UCase(Target.Formula)
ErrHandler:
Application.EnableEvents = True
End Sub


Gord Dibben MS Excel MVP

On 15 Aug 2006 13:44:05 -0700, "Lee Meadowcroft"
wrote:

Hi all,

I have just noticed an error with the autocorrect feature that is
causing me some problems in one of my spreadsheet programs. I have a
VBA Workbook_Open routine that adds autocorrect entries for each letter
of the alphabet "a" to "A" etc. and then removes them in a BeforeClose
routine.

The problem comes when trying to autocorrect two adjacent rows. I set
up a little test in a blank workbook and found the same problem. Try
this:

Add an autocorrect entry for "a" to "A".
Type "a" in cell A1, text changes to "A"
Type "a" in cell A2, text stays as "a"

But, if you leave a row out and now type "a" in cell A4 the text
autocorrects. The error only occurs when trying to autocomplete two
adjacent rows. There is also an error once you have autocorrected say
B10 and then try to autocorrect B5.

I havent noticed this before and am wondering if it is some setting on
my home PC that is different to my work PC.

I would be grateful if someone could check if this also occurs with
their Excel so I can shed some light on the issue.

Many Thanks

Lee