When cell changed by formula send Webhook

mrlaik

New Member
Joined
Mar 16, 2021
Messages
2
Office Version
  1. 365
Platform
  1. Windows
I'm trying to convert below code from sending webhook when change done manually to when cells on the specific worksheet has been updated by formula, but without success.
I was trying to change "Private Sub Worksheet_Change" to "Private Sub Worksheet_Calculate" with many variations of the code, but each time some error occured.

Help is highly appreciated.

VBA Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    If Not Intersect(Target, Range("SLA!A:Z")) Is Nothing Then
    Dim objHTTP As Object
    Dim URL As String, Json As String, ColLett As String, CellValue As String, SheetName As String
    Dim RowNum As Long
    ColLett = Split(Cells(1, Target.Column).Address, "$")(1) 'Collumn Letter
    RowNum = Target.Row 'Row Number
    SheetName = Name 'Sheet Name
    CellValue = Target.Value 'Cell Value
    Set objHTTP = CreateObject("MSXML2.ServerXMLHTTP")
    URL = " [B][URL][/B] ?SheetName=" & SheetName & "&Column=" & ColLett & "&RowNumber=" & RowNum & "&CellValue=" & CellValue
    objHTTP.Open "PATCH", URL, False
    objHTTP.setRequestHeader "Content-type", "application/json"
    objHTTP.send (Json) 'Send Information
End If
End Sub

NOTE - in "" [/B]inside the code i'm adding re...ly, but not when cell was changed by formula.
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,213,536
Messages
6,114,215
Members
448,554
Latest member
Gleisner2

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top