Well, I tried this, and I can't seem to get anything to
display in my textbox.
'*************
'Changed 11/23/2004
'*************
Private Sub CommandButton2_Click()
Dim i As Long
Dim wb As Excel.Workbook
Dim ws As Excel.Worksheet
Dim rng As Excel.Range
For i = 0 To Me.ListBox1.ListCount - 1
If Me.ListBox1.Selected(i) Then
Set wb = Application.Workbooks.Open(ListBox1.List(i,
0))
Set ws = wb.Worksheets(Left$(ListBox1.List(i, 1),
InStr(ListBox1.List(i, 1), "!") - 1))
Set rng = ws.Range(Mid$(ListBox1.List(i, 1), InStr
(ListBox1.List(i, 1), "!") + 1))
With rng
.Value = 99
.PrintOut
End With
End If
Next i
End Sub
Private Sub frmUserForm1_Initialize()
Dim cell As Range
Me.ListBox1.ColumnCount = 2
Me.ListBox1.BoundColumn = 1
Me.ListBox1.ColumnWidths = "2.5 in;2.5 in"
For Each cell In Sheet1.Range("AC2:AC69").Cells
Me.ListBox1.AddItem cell.Hyperlinks(1).SubAddress
Me.ListBox1.AddItem cell.Hyperlinks(1).Address
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) =
cell.Hyperlinks.TextToDisplay
Me.ListBox1.List(Me.ListBox1.ListCount - 1, 1) =
cell.Hyperlinks(1).SubAddress
Next cell
'Added to test
'Add these lines here
'Debug.Print cell.Address, cell.Hyperlinks.Count,
cell.Hyperlinks(1).Address
'Debug.Print cell.Hyperlinks(1).SubAddress,
cell.Hyperlinks(1).TextToDisplay
'Debug.Print "----------------------------------------
-"
' End of added lines to test
End Sub
'***********
'End Change
'***********
Any ideas? Any comments would be appreciated.
RK