Strange VBA issue in RSView32.

Andybr

Member
Join Date
Oct 2004
Posts
588
I have recently encountered a problem with some VBA code in an RSView32 project which has me baffled. The code in question has been working perfectly for years but stopped working after a number of updates to Windows 2003 Server were applied last week. The updates were rolled back but this has not helped.
The Sub Routines affected are used to automatically send E-Mails using Outlook when called by RSView events. When these sub routines are called now the operation fails and a record is placed in the activity log stating "vbaexec send_message failed" together with a second record "an error occurred in subroutine 'send_message'. The issue is not trapped by the On Error instruction and does not stop the application as I would normally expect with RSView32. Commenting out large parts of the subroutine has revealed that the lines causing the problem all contain string handling functions such as "Left" and Str() but none of them are in any way out of the ordinary. Even the line "strDate = str(date)" causes the routine to fail.
My next step with this will be to completely reinstall RSView32 but I cannot understand what would cause such a specific problem and will not really be happy until I have got to the root cause of this. Does anybody have any ideas?
 
That really sounds like a security patch was applied to prevent applications from sending email unless they are explicitly permitted.

Offhand, I'd say start by looking at any firewalls you have installed, and then you might have to look back into group policies, or even COM/DCOM permissions.

I've noticed with all Rockwell HMI products, that when there is a problem in VBA code, it doesn't necessarily actually indicate the faulting line, but the line it was executing when an asynchronous fault was received.
 
Security was my first thought but the problem does not seem to be related to the E-Mail part of the system at all. It is the string handling which fails. Reinstaling RSView did not help unfortunately.
 
I have experienced problems in the past when a security patch has been applied to the operating system and it no longer trusts old versions of some components: fm20.dll, mscomm.ocx, mswinsck.ocx etc.

Do you have latest VB6 shared libraries installed? SP6 was last one I have seen.

Nick
 
I have experienced problems in the past when a security patch has been applied to the operating system and it no longer trusts old versions of some components: fm20.dll, mscomm.ocx, mswinsck.ocx etc.

Do you have latest VB6 shared libraries installed? SP6 was last one I have seen.

Nick

That is the part that I started to worry about your COM+/DCOM permissions. On the server OS's especially, those have been seriously downgraded in privilege levels.

Are the common controls located in a "system" directory? Also, some updates, such as MS12-046 cannot be removed.
 
Change your string function calls to vb.left() and vb.str(). Some piece of software somewhere also has a left and str function in its dll and VBA does not know which one to use. Call them explicitly.

Alternately you can change the function calls to left$() or str$() as other libraries tend to not use those names but I prefer the explicit calls that way the system knows exactly which one to use.
 
Change your string function calls to vb.left() and vb.str(). Some piece of software somewhere also has a left and str function in its dll and VBA does not know which one to use. Call them explicitly.

Alternately you can change the function calls to left$() or str$() as other libraries tend to not use those names but I prefer the explicit calls that way the system knows exactly which one to use.

This was the problem. Everything is now back to normal. Thanks to everybody who helped me out with this. It had me absolutely stumped.
 

Similar Topics

Hello all, I am facing an issue with my Commander SK that I cannot solve on my own, I am struggling on it since several days :confused: The...
Replies
9
Views
1,065
Hi. I'm doing an upgrade of an old 1400e to a new panel view plus 7 standard using ftv studio v 12,which will be communicating to a slc 5/04 via...
Replies
15
Views
2,635
Can someone explain the jumper between the elements? Does it do anything? See attached jpeg.
Replies
4
Views
690
We have an OPC server getting data from a Compactlogix PLC. The PLC also communicates with a Panelview and a couple VFDs via Ethernet/IP...
Replies
3
Views
1,166
I have a small system controlled by a Siemens S7-1200 PLC. I created a totalizer function block (TIA v17), where I'm counting total revolutions...
Replies
16
Views
3,147
Back
Top Bottom