Option ExplicitPrivate Sub Command1_Click() Dim FSO As FileSystemObject Dim FL As File Dim TS As TextStream Dim s As String Set FSO = New FileSystemObject
Set FL = FSO.GetFile("C:\MSN.url") Set TS = FL.OpenAsTextStream(ForReading) s = TS.ReadAll MsgBox s Set TS = Nothing Set FL = Nothing Set FSO = Nothing End Sub
Dim FSO As FileSystemObject
Dim FL As File
Dim TS As TextStream
Dim s As String
Set FSO = New FileSystemObject
Set FL = FSO.GetFile("C:\MSN.url")
Set TS = FL.OpenAsTextStream(ForReading)
s = TS.ReadAll
MsgBox s
Set TS = Nothing
Set FL = Nothing
Set FSO = Nothing
End Sub