SteradianRK
New Member
- Joined
- Aug 24, 2022
- Messages
- 12
- Office Version
- 365
- Platform
- Windows
Hello,
I was using 32-bit Excel 2013 and had a workbook with a number of bespoke functions, some simple, some not so simple. However, after upgrading to 64-bit Office 365 all of my bespoke functions do not seem to be working.
Here is example code to work out the inverse of the tangent function (atan, or tan^-1)with the outputs in degrees, not radians. (Of course I know this can be done writing =DEGREES(ATAN(#)) instead, that is not really the point though... Creating a function called ATAND improves readability and is convenient, etc...)
Please could you advise on how this function should be modified to work in 64-bit VBA? I note that all "Declare" statements should be preceded by PrtSafe, but there is no Declare statement above!
Many thanks.
I was using 32-bit Excel 2013 and had a workbook with a number of bespoke functions, some simple, some not so simple. However, after upgrading to 64-bit Office 365 all of my bespoke functions do not seem to be working.
Here is example code to work out the inverse of the tangent function (atan, or tan^-1)with the outputs in degrees, not radians. (Of course I know this can be done writing =DEGREES(ATAN(#)) instead, that is not really the point though... Creating a function called ATAND improves readability and is convenient, etc...)
VBA Code:
Function ATAND(Val) As Double
'*************************************************************************
' DESCRIPTION
' This function performs trig but with outputs in degrees, not radians
'*************************************************************************
Dim PI As Double
PI = 4 * Atn(1)
ATAND = 180 / PI * Atn(Val)
End Function
Please could you advise on how this function should be modified to work in 64-bit VBA? I note that all "Declare" statements should be preceded by PrtSafe, but there is no Declare statement above!
Many thanks.