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

I'm using worksheet_change to flag up when a user changes values withi
a specific range in a sheet.

This works fine when the user enters data individually in each cell
but doesn't work when I either fill down / copy and paste / delete
selection of cells. Only the first cell of the selection seems to b
flagged.

Is this just a feature of worksheet change or can I get round this ( a
any given time the user could change one of 10,000+ cells) ?

The only way I can think of is to take a copy of the sheet befor
changes and then compare any changes, which (given memory constraints
is not something I'm keen on.

Any help much appreciated

Cheer

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Worksheet_Change problem

Hi
could you post your code? I would assume you check within
this code that only one cell is changed


-----Original Message-----
I'm using worksheet_change to flag up when a user changes

values within
a specific range in a sheet.

This works fine when the user enters data individually in

each cell,
but doesn't work when I either fill down / copy and

paste / delete a
selection of cells. Only the first cell of the selection

seems to be
flagged.

Is this just a feature of worksheet change or can I get

round this ( at
any given time the user could change one of 10,000+

cells) ?

The only way I can think of is to take a copy of the

sheet before
changes and then compare any changes, which (given memory

constraints)
is not something I'm keen on.

Any help much appreciated

Cheers


---
Message posted from http://www.ExcelForum.com/

.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet_Change problem

Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False

Dim changecolumn As Integer
Dim changerow As Integer
dim changeworker as String


changecolumn = Target.Column
changerow = Target.Row
changeworker = 0

If changecolumn = 89 Then Exit Sub


Set ThisWorksheet = ActiveSheet
Call change_flag(changerow, 1000, ThisWorksheet, changeworker)




End Su

--
Message posted from http://www.ExcelForum.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,885
Default Worksheet_Change problem

Hi
try:

Private Sub Worksheet_Change(ByVal Target As Range)
Dim cell As Range
Dim changecolumn As Integer
Dim changerow As Integer
Dim changeworker As String

On Error GoTo errhandler:
Application.ScreenUpdating = False
Application.EnableEvents = False

For Each cell In Target
changecolumn = cell.Column
changerow = cell.Row
changeworker = 0
If changecolumn = 89 Then Exit For
Call change_flag(changerow, 1000, Me, changeworker)
Next

errhandler:
Application.EnableEvents = True
End Sub

-----Original Message-----
Private Sub Worksheet_Change(ByVal Target As Range)
Application.ScreenUpdating = False

Dim changecolumn As Integer
Dim changerow As Integer
dim changeworker as String


changecolumn = Target.Column
changerow = Target.Row
changeworker = 0

If changecolumn = 89 Then Exit Sub


Set ThisWorksheet = ActiveSheet
Call change_flag(changerow, 1000, ThisWorksheet,

changeworker)




End Sub


---
Message posted from http://www.ExcelForum.com/

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Worksheet_Change problem

Frank,

It seems to be working for copy and pasting, but not for filling dow
(which I can get around pretty easily).

Thanks very much for your help.

Will

:

--
Message posted from http://www.ExcelForum.com



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
Problem with Worksheet_Change mike_e. New Users to Excel 7 July 13th 07 01:06 AM
Problem with function "Worksheet_Change" konpego Excel Worksheet Functions 0 June 23rd 05 05:46 AM
Worksheet_Change problem Ben_2004 Excel Programming 1 April 28th 04 11:12 PM
Problem with Worksheet_Change event Romuald Excel Programming 2 January 19th 04 09:41 AM
Worksheet_Change problem RGA Excel Programming 6 January 14th 04 11:25 AM


All times are GMT +1. The time now is 10:20 PM.

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"