Question : Access .NET Library from Excel VBA

I have a class library that has some data definitions that I share among several other .NET applications.  I would like to access this library from vba code within excel.

I have come across several examples that seem to show promise.  I don't really have a clear set of objects that I can manipulate and share with vba though.  I see that strings work easily but how can I pass in and out some other types such as arrays of structures, collections,  dictionaries and string array.  It seems that vba does not easily handle these complex types.

Also,  I'm not clear about the assorted decorations and com enabling that I must set up as well.

Answer : Access .NET Library from Excel VBA

Very simple.
If he is connecting from the owner's home we can safely assume it will either be from the same PC or a small set of known machines.
In that case, get the computer names.
Then change the logon script that runs for everyone in a TS (USRLOGON.CMD) and at the end add something like:

IF NOT %USERNAME% == "that_particular_username" Goto End
IF %CLIENTNAME% NEQ "Computer_Name" TSLOGOFF
:End

So resuming: check if the username matches the user you want to allow. If not, simply skip to the end (meaning do nothing). But if it matches it will go to the next line and check the %CLIENTNAME% (this passes the computer name the client is connecting from). If it does NOT match the one you want to allow, run a TSLOGOFF what will kick him out of the system.
Is this what you are looking for?

Cláudio Rodrigues
Citrix CTP
Random Solutions  
 
programming4us programming4us