Hi all, i was working with VBA scripts many years but i really dont get how can i run my scripts into office 365. Specially i did i simple script to count cells in range in multiply sheets. see below. But i completely dont understand how to run it in Office script.
VBA Code:
Sub SumValueAcrossTabs()
Dim i As Integer
Dim ws_num As Integer
Dim ws As Worksheet
Dim SumRg As Range
Dim x As Long
x = 0
ws_num = ThisWorkbook.Worksheets.Count
For i = 1 To ws_num
ThisWorkbook.Worksheets(i).Activate
Set SumRg = ActiveSheet.Range("Q4:Q400")
Range("W1").Value = WorksheetFunction.Count(SumRg)
Next
For i = 1 To ws_num
x = x + Sheets(i).Range("W1").Value
Next i
Sheet1.Range("C10").Value2 = x
End Sub