RSView32 and VBA

dmac

Member
Join Date
Feb 2006
Location
BC
Posts
7
Hi all,

I am having to work on a project in RSView32, which I have no experience with, and it is quickly becomming clear to me that I am going to need a lot of VBA code to do the things that I normally do using other HMI packages.

That said, I can't seem to get even simple things to work using VBA, although I'm sure this is due to the fact that I haven't much experience with that either!

As an example, I'm trying to modify a tag that is linked to a string display field, using a polygon object with touch animation.

The press action is "VBAExec Delete strTemp"
where Delete is a sub as follows:

Sub Delete(strtochange As String)
strtochange = Left(strtochange, Len(strtochange) - 1)
End Sub

I'm sure I'm doing lots wrong here, and although I'm at a point where I'm not getting error msgs from RSView anymore, this still isn't working. I thought a VBA function might work better, but my understanding is that RSView only allows subroutines?

Thanks for your help!
 
Anybody? I know this is basic stuff, but I'm really stuck. I just can't seem to pass a tag name as a parameter into a subroutine using the VBAExec command. It always treats it literally as a string, rather than looking at its value.

Please help!
 
It's been a while since I did VBA in RSView but if I remember correctly, you will need to read the value of the tag into VB first (gettagdb or something like that) then run the funtion(s) you want to on the string. If you are still stuck, I can pull up an old RSView file and take a more indepth look at it. But I don't think (not 100% sure) that you can pass a variable as a parameter from the VBAExec command.
 

Similar Topics

Good friends, I'm new to the forum, I'm working with RSview32, someone can help me how to make a macro in VBA, to save some data in Excel. to...
Replies
6
Views
1,948
We were given RSView32 project files, for quoting, that will be converted to FTView SE. Unfortunately the project has VBA references that were...
Replies
9
Views
4,315
Hi, I got a RSview32 project from site with VBA scripts and trying to run on my local machine to make some graphical changes. VB scripts are used...
Replies
6
Views
3,491
Please somebody upload this manual on another site or forward me 51770 - Sample VBA: Exercise in migrating an RSView32 application with VBA to...
Replies
8
Views
4,907
Hello all, New to the forums here and glad to find this oasis of RSView/FactoryTalk info! I have a basic VB question I hope can be answered...
Replies
4
Views
2,306
Back
Top Bottom