#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Vinod

If I edit data in any cell I wanted VBA code which returns the edit cell
reference.
For this it would be greate for me if any one can provide solution with VBA
code.

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

Put the following macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox ("cell " & Target.Address & " was changed")
End Sub
--
Gary''s Student - gsnu200764


"Vinod" wrote:

If I edit data in any cell I wanted VBA code which returns the edit cell
reference.
For this it would be greate for me if any one can provide solution with VBA
code.

Advanced Thanks,
Vinod

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Vinod

Thanks Gray for immediate response.

Suppose if I wanted to fire this event only if I edit cells from c1:c10,
then what is the code I required.

Advanced Thanks,
Vinod

"Gary''s Student" wrote:

Put the following macro in the worksheet code area:

Private Sub Worksheet_Change(ByVal Target As Range)
MsgBox ("cell " & Target.Address & " was changed")
End Sub
--
Gary''s Student - gsnu200764


"Vinod" wrote:

If I edit data in any cell I wanted VBA code which returns the edit cell
reference.
For this it would be greate for me if any one can provide solution with VBA
code.

Advanced Thanks,
Vinod

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

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C1:C10")) Is Nothing Then Exit Sub
MsgBox ("cell " & Target.Address & " was changed")
End Sub


--
Gary''s Student - gsnu200764
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 72
Default Vinod

Thanks Gary.

I think you are able to answer my another post on 1/9/2008. i.e.,

I wanted to write a VBA code which supports the following

L-Leave, S-Start, E-End, D-Date, CL- Casual Leave, SL- Sick Leave

Tue Wed Thu Fri Sat Sun Mon Tue Wed Thu
Fri Sat Sun
Name L-S-D L-E-D Type 01 02 03 04 05 06 07 08 09 10 11 12 13
Vinod 3 9 CL CL CL CL CL CL
Chris 7 8 SL SL SL
Micale 2 2 CL CL

My Requirement is If I enter 3 values (L-S-D, L-E-D, Type ) then only the
event should be fired (if any one of 3 values is not available no need to
fire event) which does the action, the leave type should be filled in it's
respective date which excludes "Sat, Sun and Holidays (Holidays list is
displayed at A1:M1) ". After this L-S-D, L-E-D, Type cell values need to be
cleared which followed by fillin color with Red for CL cells and Yellow for
SL cells.

If the same employee applies another time leaves in the same month again I
can fill L-S-D, L-E-D AND Type values. i.e as and when require I have to fill
the data.

Note: previous values results should not be wiped off.

In other words:
when ever an employee applies leave before the leave date only I will enter
the data. And again the same employee apply further leaves in the same month
then I have to enter details at L-S-D, L-E-D and Type.

Advanced Thanks,
Vinod


"Gary''s Student" wrote:

Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("C1:C10")) Is Nothing Then Exit Sub
MsgBox ("cell " & Target.Address & " was changed")
End Sub


--
Gary''s Student - gsnu200764



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
vinod Vinod[_2_] Excel Discussion (Misc queries) 0 January 9th 08 05:41 PM


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