ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   call function (https://www.excelbanter.com/excel-programming/275319-call-function.html)

sirron

call function
 
This is my call function everytime I try to call
I get a Compile error Expected list separator or )
the error is here
call openSDEWorkspace(Server As String, Instance As
String, User As String, _
Password As String, Optional Database As
String = "", _
Optional version As String
= "SDE.DEFAULT") As IWorkspace

pancho[_14_]

call function
 
You need to be aware of two things:
1.-HOW you define your routine on code modules, you do
something like this:
Function openSDEWorkspace(Server As String, _
Instance As String, User As String, _
Password As String, _
Optional Database As String = "", _
Optional version As String = "SDE.DEFAULT") _
As IWorkspace
' your openSDEWorkspace code comes here
End Function
2.- HOW you use the routine and you do it with something
like the following:
Dim IWS as IWorkspace
.....
IWS=openSDEWorkspace(ServerValue, InstanceValue, _
userValue, passwordValue, DataBaseValue, _
versionValue)
' you can use the IWS value here
.....
You can use your code using the call function, but you can
not use the IWorkspace value it will return to you like
follows:
.....
call openSDEWorkspace(ServerValue, InstanceValue, _
userValue, passwordValue, DataBaseValue, _
versionValue)
' you don't have the IWorkspace value
....


Francisco Mariscal
fcomariscal at hotmail dot com



-----Original Message-----
This is my call function everytime I try to call
I get a Compile error Expected list separator or )
the error is here
call openSDEWorkspace(Server As String, Instance As
String, User As String, _
Password As String, Optional Database As
String = "", _
Optional version As String
= "SDE.DEFAULT") As IWorkspace
.



All times are GMT +1. The time now is 03:15 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com