As I understand it, overloading allows the appropriate sub/function to be called at run time. Is it possibly to dynammically call a sub based on arguments supplied?
I am working on a console app that accepts command line arguments. The first argument is my app function to be used. Looking at the example below can I call GetRow and pass an array of args, or do I need to determine the number of arguments supplied and then call based on that?
Code:Sub GetRow(ByVal sheetName As String, ByVal rowNum As Integer, ByVal Blanks As Boolean) Console.Write("with blanks") End Sub Sub GetRow(ByVal sheetName As String, ByVal rowNum As Integer, ByVal sReg As String) Console.Write("custom s reg") End Sub Sub GetRow(ByVal sheetName As String, ByVal rowNum As Integer) Console.Write("Normal call") End Sub




Reply With Quote