Vba Reference Sharing

SingerChemE

Member
Join Date
Feb 2007
Location
Dayton,Ohio
Posts
16
I have HMI Server running RSView client that is running some vba code that is executing properly. I have the same application running on a client machine that is not running properly.
Is there server/client vba reference sharing or do I need to enable something in RSView? Please Help!
Thanks in advance!
 
It sounds like you have RSView SE, if not, please ignore me. I also don't understand what is not 'running properly'.

In SE, VBA routines are executed only client side, not server side as they are on some other HMI's.
Since they are client side, they can't access any application level global variables on other computers. One way around this, is to use Tagname Database defined memory tags, and access them through VBA from multiple locations.
 
Yes, you are correct, RSView SE. The Vba code is not executing properly on the client side, but is executing properly on the server side. Same graphic on both server and client just doesn't execute on the client side. The Vba code is pulling data to execute a batch. Thanks for the reply!
 
You say it's pulling data to execute a batch... Are you pulling data from a database? If so, do you have the same ODBC connection defined as a 'System Data Source' in Windows? Or is the server using a local data source, referenced by an absolute path to it's hard drive? The client would not be able to access the data using the same path as the server.

Just a few thoughts.
 
What he is doing is running a client on the HMI server which executes the VBA code correctly. The remote client does not.

Some items to check...
Are you using an OPC server other than a Linx driver (Enterprise, Professional, Gateway)?

Are all DLLs correctly loaded? You may have already contacted tech support and then know the answer is re-install.

Verify that the Internet Explorer settings are correct on the client and all DCOM settings are set according to what Rockwell recommends.

Good luck with your application.
 
That I understand. Which is why I point out that if you are using VBA to retrieve information from any external to RSView source, be it a text file, a spreadsheet, or a database local to the server, then the same script will generally NOT work, as the paths to the data source will probably not be the same. A work around for such a direct access data source, might be to explicitly share the data file on the server, and have the script address it with a network path. "\\MyServer\Shared_Data_Directory\My_Recipe_File.TXT".

Such sharing still has problems, as the file may be locked by one client or the other, so should be opened only in 'read-only' mode. Or the proper permissions for the share AND the file(s) aren't set on the server. Or the client Window's login is unknown to the server (if in a workgroup situation).

If the data source is an actual database, and is being accessed through something like ADO, then the non-server client computer probably needs to create an identical ODBC Data-source driver in Windows (under administrative tools) to resolve the path to the source. Again, authentication can be a problem as well.

I'm trying to offer some ideas, with very little information as to what the problem is.

"XYZ works here, but not here" isn't sufficient. The second post about trying to get batch data led me to think of network retrieval problems.

If the SE Client starts up, and it can load screens, and populate tags, the normal installation issues wouldn't seem to be a problem. The software is loaded, the remote client can find the FactoryTalk directory, and load it's resources from the IIS server. DCOM issues also probably don't exist.

Sheldn said:
What he is doing is running a client on the HMI server which executes the VBA code correctly. The remote client does not.
 
I did some experimentation last night and through the morning while the facility was down and it turns out that I needed to de-select most of the Vba References and check the Vba Reference Microsoft Forms. By doing this the code executed properly on both the Server and Client machines. Thank you rdrast and Sheldn for your help! I hope everthing is going well at SS and JI. Thanks again.
 

Similar Topics

Hello all, I am trying to use the object gTagDb but don't know in which reference it is in. Any idea? Thanks,
Replies
5
Views
2,366
Hi Guys, I am having some difficulty getting some VBA to work.My VBA is bad... I want to write a subroutine which takes 2 parameters 1. Value to...
Replies
0
Views
5,674
Dear everyone, I need to use the ADO component for SQL data processing. The normal way is to statically tick the ms ado reference in the...
Replies
2
Views
1,755
Hi Guys, Looking for someone well versed in VBA that can either tell me a certain naming convention or point me in the right direction (I'm a...
Replies
0
Views
51
I need to use a TreeView in my FactoryTalk SE project and i found it under "ActiveX Object" > "Microsoft TreeView Control 6.0 (SP4)". Everything...
Replies
0
Views
37
Back
Top Bottom