When you're calling the sub either get rid of the parentheses like this, Conect hServer, hpool, vServerName, vUserName , vPassword , hUser or, leave the parentheses and use the CALL keyword, like this, Call Conect(hServer, hpool, vServerName, vUserName , vPassword , hUser) You were getting the error because it was expecting a return value from a function to be assigned to a variable such as, myConString = Conect(hServer, hpool, vServerName, vUserName , vPassword , hUser)
|