#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default Help....

I wrote this bit of code to start up a workbook with the
autocomplete disabled and the caps turned on (I think),
but I can't seem to get it to work automatically when I
open the workbook. What am I doing wrong (besides waking
up this morning.


Private Sub WorkBook_Open()
With Application
.AutoCorrect.CorrectCapsLock = True
.EnableAutoComplete = Not .EnableAutoComplete
End With
End Sub

TIA

John Petty
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Help....

John,

If it's not working I might guess that you didn't place it in the
workbook module.
Double click on "ThisWorkbook" from the VBA editor and paste your
code into the window that appears on the right.

John

John Petty wrote:

I wrote this bit of code to start up a workbook with the
autocomplete disabled and the caps turned on (I think),
but I can't seem to get it to work automatically when I
open the workbook. What am I doing wrong (besides waking
up this morning.

Private Sub WorkBook_Open()
With Application
.AutoCorrect.CorrectCapsLock = True
.EnableAutoComplete = Not .EnableAutoComplete
End With
End Sub

TIA

John Petty


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 550
Default Help....

John,

And be sure to delete it from where you had it originally.

Another option by the way would be to leave it where it is
and rename it to
Sub Auto_Open()
instead of
Private Sub WorkBook_Open()

The Auto_Open sub will only work in a regular module.
The other code you were using has to be in the Workbook
module.

John

John Petty wrote:

I wrote this bit of code to start up a workbook with the
autocomplete disabled and the caps turned on (I think),
but I can't seem to get it to work automatically when I
open the workbook. What am I doing wrong (besides waking
up this morning.

Private Sub WorkBook_Open()
With Application
.AutoCorrect.CorrectCapsLock = True
.EnableAutoComplete = Not .EnableAutoComplete
End With
End Sub

TIA

John Petty


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:53 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"