lezawang
Well-known Member
- Joined
- Mar 27, 2016
- Messages
- 1,805
- Office Version
- 2016
- Platform
- Windows
Hi
I am reading the article below which list most popular functions in vba.
https://www.excelfunctions.net/vba-functions.html
I am not sure based on what the author listed all these functions?? Where are these functions located? Part of which class? I tried to user Object browser but could not find these functions anywhere?
There are other list of functions, for example, Average(), Vlookup(), Hlookup() etc which are part of WorkSheetFunction object, the author did not list them, why is that? these function can not be called without using
WorkSheetFunction.FunctionName()
while I can not use average() function without WOrksheetFunction.average(), I can use Now(), Date() function without anything!!
Thank you very much.
I am reading the article below which list most popular functions in vba.
https://www.excelfunctions.net/vba-functions.html
I am not sure based on what the author listed all these functions?? Where are these functions located? Part of which class? I tried to user Object browser but could not find these functions anywhere?
There are other list of functions, for example, Average(), Vlookup(), Hlookup() etc which are part of WorkSheetFunction object, the author did not list them, why is that? these function can not be called without using
WorkSheetFunction.FunctionName()
while I can not use average() function without WOrksheetFunction.average(), I can use Now(), Date() function without anything!!
Code:
'time
Function mytime() As Date
mytime = Time
End Function
'date
Function mydate() As Date
mydate = Date
End Function
' average
Function myaverage(x As Double, y As Double) As Double
myaverage = WorksheetFunction.Average(x, y)
End Function
Last edited: