R
relative_virtue
Am trying to make my Excel 2003 worksheet compatible with Excel 97,
and have already hit the first snag. The spreadsheet allows users to
virtually "attach" documents to it, which are later sent in the
background as Lotus Notes attachments. All Excel does is open a file
dialog when "ADD" is clicked in a certain cell and then paste the name
of the selected file on a hidden worksheet.
To do this, I use the following bits of code, neither supported in
Excel 97:
Cells.Hyperlinks.Add anchor:=ActiveSheet.Range(.Address), Address:="",
ScreenTip:="Click here to attach document to spreadsheet",
TextToDisplay:="ADD"
.. . . and. . . .
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal
Target As Hyperlink)
If Not Intersect(Target.Parent, Range(Target.Parent.Address)) Is
Nothing Then
AddDocs Target.Parent
End If
End Sub
The Hyperlinks object in Excel 97 doesn't seem to support
TextToDisplay, which is a problem, as I obviously can't use an actual
URL here. Likewise, _FollowHyperlink does not seem to be a valid
workbook/sheet event.
Am willing to consider alternatives - can anyone else think of a way
to trap a single mouse click on a cell? Or does anyone know a way to
"fix" the '97 Hyperlinks object?
Grateful for any help,
Tristan
and have already hit the first snag. The spreadsheet allows users to
virtually "attach" documents to it, which are later sent in the
background as Lotus Notes attachments. All Excel does is open a file
dialog when "ADD" is clicked in a certain cell and then paste the name
of the selected file on a hidden worksheet.
To do this, I use the following bits of code, neither supported in
Excel 97:
Cells.Hyperlinks.Add anchor:=ActiveSheet.Range(.Address), Address:="",
ScreenTip:="Click here to attach document to spreadsheet",
TextToDisplay:="ADD"
.. . . and. . . .
Private Sub Workbook_SheetFollowHyperlink(ByVal Sh As Object, ByVal
Target As Hyperlink)
If Not Intersect(Target.Parent, Range(Target.Parent.Address)) Is
Nothing Then
AddDocs Target.Parent
End If
End Sub
The Hyperlinks object in Excel 97 doesn't seem to support
TextToDisplay, which is a problem, as I obviously can't use an actual
URL here. Likewise, _FollowHyperlink does not seem to be a valid
workbook/sheet event.
Am willing to consider alternatives - can anyone else think of a way
to trap a single mouse click on a cell? Or does anyone know a way to
"fix" the '97 Hyperlinks object?
Grateful for any help,
Tristan