ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   AutoCorrect Error in (my?) Excel (https://www.excelbanter.com/excel-discussion-misc-queries/105123-autocorrect-error-my-excel.html)

Lee Meadowcroft

AutoCorrect Error in (my?) Excel
 
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


Gord Dibben

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



Lee Meadowcroft

AutoCorrect Error in (my?) Excel
 
Thanks for your suggestion, could you further develop that for me so
that only single character text in a cell will change to upper case
e.g. revision letter cell will have A,B,C etc. and another cell has
similar entries.

There is a data validation on the cell to only allow certain capital
letters, will the worksheet_change method kick in before the data
validation. e.g. one column can only accept H,A,B,C and the revision
column accepts A-Z.

Thanks,

Lee


Gord Dibben wrote:
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




All times are GMT +1. The time now is 12:57 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com