ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Vinod (https://www.excelbanter.com/excel-discussion-misc-queries/172298-vinod.html)

Vinod[_2_]

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

Gary''s Student

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


Vinod[_2_]

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


Gary''s Student

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

Vinod[_2_]

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



All times are GMT +1. The time now is 03:24 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com