medeardorff
New Member
- Joined
- Mar 5, 2013
- Messages
- 12
I had created a couple of hundred XLM functions in the OLD days when that was the paradigm prior to VBA. I am a structural engineer and I automated my office with spreadsheets that optimized designs, did nice formatting using the arcana of XLM. It was quite a skill; but no more.
Now I am converting them to VBA, A language I programmed in as VB6 and earlier.
The first issue I am having is getting around the #NAME error I am receiving. The UDF is in a standard module. The code is shown below.
Option Explicit
Option Base 1
Function DecFtToIntFt(Ft As Long) As Integer
DecFtToIntFt = Int(Ft)
End Function
Here I am just returning the integer portion of a decimal representation of a foot measurement to be rendered as part of a dimension string. Unfortunately, I get a #NAME error.
Now I am converting them to VBA, A language I programmed in as VB6 and earlier.
The first issue I am having is getting around the #NAME error I am receiving. The UDF is in a standard module. The code is shown below.
Option Explicit
Option Base 1
Function DecFtToIntFt(Ft As Long) As Integer
DecFtToIntFt = Int(Ft)
End Function
Here I am just returning the integer portion of a decimal representation of a foot measurement to be rendered as part of a dimension string. Unfortunately, I get a #NAME error.