Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Problem with Worksheet_Change event

I use the Worksheet_Change(ByVal Target AS Excel.Range) event to update input values (I replace "-" character with 0) on Office 97 (NT4)
For most of the computers, the Target.Value is equal to the value

But on some computer the new value is not available. Indeed, the Target.Value is still equal to previous value of the cell

Example
So when I have a cell equal to
The user inputs 1
The event replaces the - with 0 instead of keeping 1

What's the problem? Thanks for email me your response to

Many thanks for your help


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Problem with Worksheet_Change event

Romuald,

Post the code.

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Romuald" wrote in message
...
I use the Worksheet_Change(ByVal Target AS Excel.Range) event to update

input values (I replace "-" character with 0) on Office 97 (NT4).
For most of the computers, the Target.Value is equal to the value.

But on some computer the new value is not available. Indeed, the

Target.Value is still equal to previous value of the cell.

Example :
So when I have a cell equal to -
The user inputs 12
The event replaces the - with 0 instead of keeping 12

What's the problem? Thanks for email me your response to

!

Many thanks for your help!




  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Problem with Worksheet_Change event

hi

here the following code

Private Sub Worksheet_Change(ByVal Target As Excel.Range
On Error GoTo trt_Error

Dim sValue As String, i As Long, j As Lon

If Not blnDeActivateChangeEvent The
blnDeActivateChangeEvent = Tru
If Not mdlScreen_Display.IsBuildingScreen The
' Gestion des modes particuliers pour les saisie
If Me.cbxRefreshOnComboChange.value The
If Target.Count = 1 The
' Remplace les Missings pas des
If Val(SYReplace(Cells(Target.Row, Target.Column).value, ",", ".")) = 0 The
Cells(Target.Row, Target.Column).value =
End I
inputValues = inputValues & ConvColToASCII(Target.Column) & Target.Row & "=" & Target.value & ";
Els
' Sélection multipl
For i = Target.Column To Target.Column + Target.Cells.Columns.Count -
For j = Target.Row To Target.Row + Target.Cells.Rows.Count -
' Remplace les Missings pas des
If Val(SYReplace(Cells(Target.Row, Target.Column).value, ",", ".")) = 0 And Not bMODE_DisableReplaceMissing The
Cells(j, i).value =
End I
inputValues = inputValues & ConvColToASCII(i) & j & "=" & Cells(j, i).value & ";
Nex
Nex
End I
Els
MsgBox "Input data cannot be saved when the auto-refresh is disabled." & vbCr
& "Enable auto-refresh before you enter your data.", vbCritical, "Unable to input data
End I
End I
blnDeActivateChangeEvent = Fals
End I

trt_Exit
Exit Su
trt_Error
Resume trt_Exit
End Su


An idea?
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
Disabling WORKSHEET_CHANGE event Jase Excel Discussion (Misc queries) 1 April 25th 08 04:32 PM
Controling the Worksheet_Change Event? DCSwearingen Excel Discussion (Misc queries) 3 May 25th 06 08:32 PM
Worksheet_Change Event Sam Excel Programming 2 November 21st 03 06:51 PM
xl97 and Worksheet_Change event ? Greg Wilson[_3_] Excel Programming 1 September 10th 03 04:17 AM
Worksheet_Change Event Not Working Michael Beckinsale Excel Programming 0 August 1st 03 02:43 PM


All times are GMT +1. The time now is 06:52 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"