Link to home
Start Free TrialLog in
Avatar of KC_78
KC_78

asked on

Browser like interface?

Hi, hope you can help me with this VBA enhancement.  I am working on a project using the application PI.  It utilizes VBA similarly to Excel etc.

This is the situation, I have a main page and there are rectangular boxes that when I click on, will take me to a "display" (graph or trend).  Right now, I have like 12 boxes, and I am naming all 12 boxes and creating a click event for each.  i.e.

"Public Sub SCV_Phos_Abs_Lnk_Click(ByVal lvarX As Long, ByVal lvarY As Long)
    LinkTo "SCV Trends", "Phos_Abs_Hi_Press"
End Sub
----------
Public Sub SCV_Phos_Abs_Lnk_MouseOut()
    SCV_Phos_Abs_Lnk.LineStyle.Weight = 1
    SCV_Phos_Abs_Lnk.LineColor = RGB(0, 0, 0)
End Sub
-------------
Public Sub SCV_Phos_Abs_Lnk_MouseOver()
    SCV_Phos_Abs_Lnk.LineStyle.Weight = 2
    SCV_Phos_Abs_Lnk.LineColor = RGB(0, 0, 255)
End Sub"

where "LinkTo" is a procedure I created, and "SCV Trends is the name of the display page and "Phos_Abs_Hi_Press" is the name of one of the 12 displays on that page.

Instead of having 12 of those, is there a way to generalize the code and make it like kinda web browsing.......where I don't have to name each link?

Thanks!

Avatar of dds110
dds110

Have you tried using buttons with a hyperlink property?
Better question is what program are you working in?  Access, Word, Excel, Powerpoint, etc...?
Avatar of KC_78

ASKER

As I mentioned, PI.  It is by a company called OSISoft.  It is a datamining program.  It collects plant data out in the field and sends it back to the client (me).  I am developing screens and stuff like that, information to be pulled etc.....

The problem with this program is that it's little drawing display interface is not very powerful.  You can make a symbol (button, box, circle etc..) scriptable and then you can name it and write scripts using VBA.

Is this clearer?
ASKER CERTIFIED SOLUTION
Avatar of dds110
dds110

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial