RSView32 & VBA

aiki202

Member
Join Date
Aug 2007
Location
Pennsylvania
Posts
178
How do you close the current RSView application with VBA code? I have tried using a button on a screen that calls a VBA subroutine. Within the subroutine I have:
gCommand.Execute ("Quit")
This doesn't work.
Also, does anyone know how to shutdown a PC running Windows XP SP2 with VBA code in RSView32? I found 1 example on the internet but it also does not work.

Thanks!
 
tomalbright said:
I have a button that exits RSView, it has the code:

DisplayServerOff;Pause 4;Quit

Works every time.
If I place the "Quit" command behind a button in RSView32 it also works properly, but it will not work from the VBA code?

danpantea said:
There is a a call of another program in both RSView and VB. I used it before from PCIM (VB based SCADA) and than for some customers I used it from RSView. You might get static from Windows if you are not in REAL ADMINISTRATOR login.


I was looking for actual VBA code to perform this task. Something like a Windows API call?
 
I figured out both issues. The "Quit" command was not working from the VBA code due to the fact that it was in a module. I needed to call the sub in the code module from the project module. Shutting down Windows XP (XP only) is done with a 'Shell' statement. The shell statement forces a shutdown. I am sure there is a way to stop each process correctly, just like a normal shutdown does, but I have not figured this out yet.
 

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,954
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,320
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,495
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,913
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,308
Back
Top Bottom