• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Overwrite cells

ganeshm

Member
Hi....


Thank you for extending your help and guidance.


Here i have an excel sheet (macro) in which i want to overwrite particular cell.


http://www.adrive.com/public/kfr6pn/Copy Sheet.xlsm


1. There is a form control button to retrieve the data from next sheet.

2. Once retrieved, i change it and press save.

3. when save is pressed, it doesn't overwrite but comes in the next row of the sheet.


Is this formula right or any changes need to be made:

[pre]
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
With ActiveSheet
If Target.Cells.Count = 1 Then
If Target.Column = 5 Then
If InStr("2 5 6 7", Target.Row) > 0 Then

Application.EnableEvents = True
End If
End With

End Sub
[/pre]

Regards,

ganeshm
 
Back
Top