#1   Report Post  
Posted to microsoft.public.excel.misc
RKS RKS is offline
external usenet poster
 
Posts: 63
Default change

Hi
I have a excel file which we can send to user. how we can know if user
change any value in my sheet. i can allow to user to change the value. my
purpose is that we would know which cell user change value.

if it is possible if user change any value that cell will be red. please
help me.

Thanks
RKS


  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default change

Put the following event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Application.EnableEvents = False
t.Interior.ColorIndex = 3
Application.EnableEvents = True
End Sub


Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.


To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


--
Gary''s Student - gsnu200781


"RKS" wrote:

Hi
I have a excel file which we can send to user. how we can know if user
change any value in my sheet. i can allow to user to change the value. my
purpose is that we would know which cell user change value.

if it is possible if user change any value that cell will be red. please
help me.

Thanks
RKS


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default change

Changing the colorindex doesn't cause the worksheet_change event to fire.

You could just use:

Private Sub Worksheet_Change(ByVal Target As Range)
target.Interior.ColorIndex = 3
End Sub



Gary''s Student wrote:

Put the following event macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
Set t = Target
Application.EnableEvents = False
t.Interior.ColorIndex = 3
Application.EnableEvents = True
End Sub

Because it is worksheet code, it is very easy to install and automatic to use:

1. right-click the tab name near the bottom of the Excel window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you have any concerns, first try it on a trial worksheet.

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm

--
Gary''s Student - gsnu200781

"RKS" wrote:

Hi
I have a excel file which we can send to user. how we can know if user
change any value in my sheet. i can allow to user to change the value. my
purpose is that we would know which cell user change value.

if it is possible if user change any value that cell will be red. please
help me.

Thanks
RKS



--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default change

Just to add to GS's response:

This kind of thing depends on the cooperation of that end user.

If the end user makes a non-change change (reentering RKS as RKS, for instance),
the fill color will change.

If the end user disables macros or even events, then you won't see the changes.
And the end user can just change the fill color back.

Depending on what you're allowing the users to do (change cells, but no
inserting/deleting rows or columns???), you may want to keep a copy of the
worksheet (worksheets???) and use another program to make the comparison.

http://www.cpearson.com/excel/whatsnew.aspx
look for compare.xla

It does that cell by cell comparison (A1 with A1, x99 with x99, ...)

So inserting a new row 1 will pretty much make the results worthless.

RKS wrote:

Hi
I have a excel file which we can send to user. how we can know if user
change any value in my sheet. i can allow to user to change the value. my
purpose is that we would know which cell user change value.

if it is possible if user change any value that cell will be red. please
help me.

Thanks
RKS


--

Dave Peterson
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
change scaling % but font size didnt change porportionally, pls he Scaling question Excel Discussion (Misc queries) 0 March 12th 07 03:16 AM
Excel bar chart formatting of bars to change colors as data change JudyT Excel Discussion (Misc queries) 1 January 24th 07 06:07 PM
Use date modified to change format & create filter to track change PAR Excel Worksheet Functions 0 November 15th 06 09:17 PM
making copied cells change with change in original cell Jennifer Mcdermeit Excel Worksheet Functions 2 July 20th 06 04:58 PM
Change workbook sheet reference using cell A1 to change a vairable Reed Excel Worksheet Functions 4 January 20th 05 07:15 PM


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