Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Error Msg Deactivating Code

Upon opening this workbook, some, not all, network users
are receiving:
Run-time error '438'
Object doesn't support this property or method.

They dismiss the message (by clicking on "End" and
continue normally. The "Debug" option is not available.

The only thing I have found that does not work for
these "error" users is the below code, among many other
macros and Subs that do work.

Can someone give me an idea of what the problem is and how
to correct it?

Private Sub Worksheet_Change(ByVal Target As Range)
'Forces upper case in cells on the BSC page

On Error GoTo Error_Handler

With Target
If Not .HasFormula Then
Application.EnableEvents = False

If Target.Column = 14 And Target.Row = 3 Then_
Target.Value = UCase(Target.Value)
'Ucase for title block, BSC page, cell C14

If Target.Column = 16 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Customer Perspective title block, BSC page,
cell P12

If Target.Column = 16 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Financial Perspective title block, BSC page,
cell P30

If Target.Column = 42 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Learning and Growth Perspective title block,
BSC page, cell AP12

If Target.Column = 42 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Internal Business Process Perspective title
block, BSC page, cell AP30

Application.EnableEvents = True
End If
End With

Error_Handler:
Resume Next

End Sub


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error Msg Deactivating Code

For Cell C14, you have the row and column reversed in the IF statement, so
that may give the appearance of not working.

When I copied you code, all your line continuation characters (underscores)
were butt up against the Then statement. They must be preceded by a space

If condition Then _

Perhaps this is the source of your problem. When I put in the space, the
code worked fine for me.

--
Regards,
Tom Ogilvy


"Phil Hageman" wrote in message
...
Upon opening this workbook, some, not all, network users
are receiving:
Run-time error '438'
Object doesn't support this property or method.

They dismiss the message (by clicking on "End" and
continue normally. The "Debug" option is not available.

The only thing I have found that does not work for
these "error" users is the below code, among many other
macros and Subs that do work.

Can someone give me an idea of what the problem is and how
to correct it?

Private Sub Worksheet_Change(ByVal Target As Range)
'Forces upper case in cells on the BSC page

On Error GoTo Error_Handler

With Target
If Not .HasFormula Then
Application.EnableEvents = False

If Target.Column = 14 And Target.Row = 3 Then_
Target.Value = UCase(Target.Value)
'Ucase for title block, BSC page, cell C14

If Target.Column = 16 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Customer Perspective title block, BSC page,
cell P12

If Target.Column = 16 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Financial Perspective title block, BSC page,
cell P30

If Target.Column = 42 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Learning and Growth Perspective title block,
BSC page, cell AP12

If Target.Column = 42 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Internal Business Process Perspective title
block, BSC page, cell AP30

Application.EnableEvents = True
End If
End With

Error_Handler:
Resume Next

End Sub




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 80
Default Error Msg Deactivating Code

Tom, Thanks for your reply. In the comment, C14 is
actually cell N3. Could this code possibly have another
bug? Since I have only two users, out of many, with this
error problem, I'm thinking there must be a local problem
or setting to be addressed. Your view?

Phil

-----Original Message-----
For Cell C14, you have the row and column reversed in the

IF statement, so
that may give the appearance of not working.

When I copied you code, all your line continuation

characters (underscores)
were butt up against the Then statement. They must be

preceded by a space

If condition Then _

Perhaps this is the source of your problem. When I put

in the space, the
code worked fine for me.

--
Regards,
Tom Ogilvy


"Phil Hageman" wrote in message
...
Upon opening this workbook, some, not all, network users
are receiving:
Run-time error '438'
Object doesn't support this property or method.

They dismiss the message (by clicking on "End" and
continue normally. The "Debug" option is not available.

The only thing I have found that does not work for
these "error" users is the below code, among many other
macros and Subs that do work.

Can someone give me an idea of what the problem is and

how
to correct it?

Private Sub Worksheet_Change(ByVal Target As Range)
'Forces upper case in cells on the BSC page

On Error GoTo Error_Handler

With Target
If Not .HasFormula Then
Application.EnableEvents = False

If Target.Column = 14 And Target.Row = 3 Then_
Target.Value = UCase(Target.Value)
'Ucase for title block, BSC page, cell C14

If Target.Column = 16 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Customer Perspective title block, BSC

page,
cell P12

If Target.Column = 16 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Financial Perspective title block, BSC

page,
cell P30

If Target.Column = 42 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Learning and Growth Perspective title

block,
BSC page, cell AP12

If Target.Column = 42 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Internal Business Process Perspective

title
block, BSC page, cell AP30

Application.EnableEvents = True
End If
End With

Error_Handler:
Resume Next

End Sub




.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Error Msg Deactivating Code

Phil,
If the code works in most workbooks, then it probably doesn't have anything
to do with syntax - which is about all that would be evident from looking at
the code. You would need to look at the two problem systems and see what is
the same about them that is different from the ones where it works.

Look at addins, references, other workbooks being open, operating system
version, version of excel - those type things. Environmental things that
your macros might depend on.

--
Regards,
Tom Ogilvy



-----Original Message-----
For Cell C14, you have the row and column reversed in the

IF statement, so
that may give the appearance of not working.

When I copied you code, all your line continuation

characters (underscores)
were butt up against the Then statement. They must be

preceded by a space

If condition Then _

Perhaps this is the source of your problem. When I put

in the space, the
code worked fine for me.

--
Regards,
Tom Ogilvy


"Phil Hageman" wrote in message
...
Upon opening this workbook, some, not all, network users
are receiving:
Run-time error '438'
Object doesn't support this property or method.

They dismiss the message (by clicking on "End" and
continue normally. The "Debug" option is not available.

The only thing I have found that does not work for
these "error" users is the below code, among many other
macros and Subs that do work.

Can someone give me an idea of what the problem is and

how
to correct it?

Private Sub Worksheet_Change(ByVal Target As Range)
'Forces upper case in cells on the BSC page

On Error GoTo Error_Handler

With Target
If Not .HasFormula Then
Application.EnableEvents = False

If Target.Column = 14 And Target.Row = 3 Then_
Target.Value = UCase(Target.Value)
'Ucase for title block, BSC page, cell C14

If Target.Column = 16 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Customer Perspective title block, BSC

page,
cell P12

If Target.Column = 16 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Financial Perspective title block, BSC

page,
cell P30

If Target.Column = 42 And Target.Row = 12 Then_
Target.Value = UCase(Target.Value)
'Ucase for Learning and Growth Perspective title

block,
BSC page, cell AP12

If Target.Column = 42 And Target.Row = 30 Then_
Target.Value = UCase(Target.Value)
'Ucase for Internal Business Process Perspective

title
block, BSC page, cell AP30

Application.EnableEvents = True
End If
End With

Error_Handler:
Resume Next

End Sub




.



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Deactivating a macro button Victor Delta[_2_] Excel Discussion (Misc queries) 2 November 8th 09 02:07 PM
Deactivating an Excel Warning Bishop Excel Discussion (Misc queries) 1 May 29th 09 05:48 AM
Deactivating a Forms macro button based on a worksheet condition? Ace70 Excel Discussion (Misc queries) 3 June 10th 07 10:31 PM
Deactivating an embedded chart TheRobsterUK Excel Discussion (Misc queries) 0 October 3rd 05 01:30 AM
Hide/Show modeless userform when activating/deactivating workbooks Jeremy Gollehon[_2_] Excel Programming 0 August 28th 03 11:05 PM


All times are GMT +1. The time now is 06:13 PM.

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

About Us

"It's about Microsoft Excel"