Hello...

I have a function that creates file paths for my program, essentially you would call the function in the following manner:

Dim MyPath as string

MyPath = MyFilePath("myexe.exe")

and MyPath would now be something along the lines of "C:\MyDir\myProgram\myexe.exe"

I also have places where I need just the directory, ie "C:\MyDir\myProgram\", this is where I would like to overload the MyFilePath function to return the file path when it is sent a string and to return the directory when it isn't sent any parameters. This is a simple exercise in other languages but I cannot seem to find an example code snippet for this in VB6, if anyone knows how to overload functions in VB I would appreciate it...

Thanks