An easy way is to use Application.FollowHyperlink
Private Sub Command4_Click()
On Error GoTo Err_Command4_Click
Dim stPath As String
stPath =
"\\broan-nutone.com\broan\Logistics\shiftmetrics\Performance\Test_Sheet_" &
"Me.txtFileDate"
Application.FollowHyperlink stPath
Exit_Command4_Click:
Exit Sub
Err_Command4_Click:
MsgBox Err.Description
Resume Exit_Command4_Click
End Sub
note: stPath needs to be the full path including the name of the file to
open
Jeanette Cunningham
>I would like to set up a button that when pressed, would open the
> coresponding Excel spreadsheet. The speadsheet file name would be that
[quoted text clipped - 34 lines]
> If this is possible, could this also be modified to import data from that
> sheet also using a diffrent button?
Sydious - 20 Feb 2008 10:22 GMT
Using this code, it thinks the file name is:
"\\broan-nutone.com\broan\Logistics\shiftmetrics\Performance\Test_Sheet_Me.txtFileDate"
Its not taking the value of txtFileDate and adding it to the the
\\broan-nutone.com\broan\Logistics\shiftmetrics\Performance\Test_Sheet_ file
name.
> An easy way is to use Application.FollowHyperlink
>
[quoted text clipped - 59 lines]
> > If this is possible, could this also be modified to import data from that
> > sheet also using a diffrent button?
Jeanette Cunningham - 20 Feb 2008 20:01 GMT
Oops!
try it this way
"\\broan-nutone.com\broan\Logistics\shiftmetrics\Performance\Test_Sheet" &
Me.txtFileDate
Jeanette Cunningham
> Using this code, it thinks the file name is:
> "\\broan-nutone.com\broan\Logistics\shiftmetrics\Performance\Test_Sheet_Me.txtFileDate"
[quoted text clipped - 71 lines]
>> > that
>> > sheet also using a diffrent button?
Ron2006 - 25 Feb 2008 19:48 GMT
> Oops!
> try it this way
[quoted text clipped - 80 lines]
>
> - Show quoted text -
per the last example, you will need another _ after sheet"
before the "
Ron