help please

T

tommyboy

i have this function in a work book and it works fine

Private Sub Worksheet_Change(ByVal Target As Range)
With Sheets("sheet17")
x = .Cells(Rows.Count, "a").End(xlUp).Row + 1
If Target.Address = "$B$4" Then .Cells(x, "a") = Target
End With
End Sub


It basically update sheet17 column a with any changed data on b
sheet1

The problem is when using the worksheet_change event, it will no
update sheet17 when the cell is changed by a calculation

I know i need to use worksheet_calculate, but canot figer out the cod
for this

"Private Sub Worksheet_calculate(ByVal Target As Range)
With Sheets("sheet17")
x = .Cells(Rows.Count, "a").End(xlUp).Row + 1
If Target.Address = "$B$4" Then .Cells(x, "a") = Target
End With
End Sub"

This gives me errors, where am i going wrong, any help is gratel
apriciated
 
T

tommyboy

tried but this doesnt work, am i just adding the

With Sheets("sheet17")
x = .Cells(Rows.Count, "a").End(xlUp).Row + 1
If Target.Address = "$B$4" Then .Cells(x, "a") = Target
End With
End Sub

after that lin
 
K

kraljb

should be, I am not the best with events though, you may want to try th
programming board..
 
T

tommyboy

thanks anyway,

this is realy starting to get to me, i am stuck on this one point tha
has been hasseling me for weeks.

Normally i can work things out but on this one im well and truely stuc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top