Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Asksuresh Programmer   on Oct 19 In MS Office Category.

  
Question Answered By: Jamie Roberts   on Oct 19

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.

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Setting a dynamic path for VBA Or get search suggestion and latest updates.


Tagged: