ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   worksheet_calculate **help** (https://www.excelbanter.com/excel-programming/302933-worksheet_calculate-%2A%2Ahelp%2A%2A.html)

tommyboy

worksheet_calculate **help**
 
I have this code

Private Sub Workbook_SheetCalculate(ByVal Sh As Object)
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 works with worksheet_change but not worksheet calculate,

can someone please tell me where i am going wrong as i havent any idea

--
Message posted from http://www.ExcelForum.com


BrianB

worksheet_calculate **help**
 
I don't know if this will do what you want, but this is the equivalen
code.

The method does not recognise Target so you will have to use :-


Code
-------------------
If ActiveCell.Address = "$B$4" Then .Cells(x, "a") = ActiveCell.Value

-------------------


--
Message posted from http://www.ExcelForum.com


tommyboy[_2_]

worksheet_calculate **help**
 
sorry this doesnt work,


why is it alway that 1 thing that will not go righ

--
Message posted from http://www.ExcelForum.com



All times are GMT +1. The time now is 06:32 AM.

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