?
Solved

Browser like interface?

Posted on 2004-04-06
4
Medium Priority
?
163 Views
Last Modified: 2011-09-20
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!

0
Comment
Question by:KC_78
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 8

Expert Comment

by:dds110
ID: 10769102
Have you tried using buttons with a hyperlink property?
0
 
LVL 8

Expert Comment

by:dds110
ID: 10769106
Better question is what program are you working in?  Access, Word, Excel, Powerpoint, etc...?
0
 

Author Comment

by:KC_78
ID: 10769362
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?
0
 
LVL 8

Accepted Solution

by:
dds110 earned 500 total points
ID: 10770471
The only thing I can think to do (since I've never seen this program) is to create a function that accepts some argument that references the button clicked.  In this function, you could write a Select Case statement.  You will still have 12 separate functions for each button in order to call the Select Case Function.

Or perhaps the program will let you create control arrays (still have to have the select case function).

Sorry I couldn't be more help.
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question