i got this code & its working for me,
Private Sub Matched_Password()
Dim posn As Integer, i As Integer
Dim flName As String
Dim fPath As String ' path of file
flName = ThisWorkbook.FullName
posn = 0
For i = 1 To Len(flName)
If (Mid(flName, i, 1) = "\") Then posn = i
Next i
fPath = Left(flName, posn - 1)
Workbooks.Open fPath & "\dailyreport.xls"
Workbooks.Open fPath & "\sharesfile.xls"
Call SSGC
End Sub
David Grugeon <yahoo@...> wrote:
Hi Sajjad
Try it without the brackets.
If that does not work you may need to specify the path.