?
Solved

how to put hyperlinks in a grid(flex/hflexgrid)?

Posted on 2004-10-07
3
Medium Priority
?
350 Views
Last Modified: 2008-01-09
Is there any way to how to put hyperlinks in a grid(flex/hflexgrid)?
0
Comment
Question by:sonashish
[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
  • 2
3 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 200 total points
ID: 12246408
Try customize below, example using MSFlexGrid:

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Public Function StartDoc(ByVal FileName As String, Optional CommandLine As String = "") As Long
    StartDoc = ShellExecute(0&, "Open", FileName, CommandLine, vbNullString, 1)
End Function

Private Sub Form_Load()
    MSFlexGrid1.Cols = 3
    MSFlexGrid1.Rows = 5
    MSFlexGrid1.FixedCols = 1
    MSFlexGrid1.FixedRows = 1
   
    For i = 1 To 4
        MSFlexGrid1.TextMatrix(i, 1) = "Item " & i
        MSFlexGrid1.Row = i
        MSFlexGrid1.col = 2
        MSFlexGrid1.CellForeColor = vbBlue
        MSFlexGrid1.CellFontUnderline = True
    Next i
   
    MSFlexGrid1.ColWidth(1) = 1000
    MSFlexGrid1.ColWidth(2) = 2500
   
    MSFlexGrid1.TextMatrix(1, 2) = "http://www.yahoo.com"
    MSFlexGrid1.TextMatrix(2, 2) = "http://www.google.com"
    MSFlexGrid1.TextMatrix(3, 2) = "http://www.experts-exchange.com"
    MSFlexGrid1.TextMatrix(4, 2) = "http://www.download.com"
   
End Sub

Private Sub MSFlexGrid1_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
    If MSFlexGrid1.col = 2 Then
        StartDoc MSFlexGrid1.TextMatrix(MSFlexGrid1.Row, MSFlexGrid1.col)
    End If
End Sub
0
 
LVL 2

Author Comment

by:sonashish
ID: 12256130
ryancys

This is an excellent solution. I am giving you full point.

Just for FYI, following I need to mention in a module(nas file)

Public Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" (ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, ByVal lpParameters As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long

Everything is working perfectly, as I am looking for.
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 12256135
Sure and glad could make help here, cheers 8-)
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses

649 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