Hi John,
Having looked through your posts I think it might be easier to try
something new.
Open windows "notepad" and copy and paste the lines below. Don't include the
dotted lines.
'----------
start \Direct Payments DOT\"1 payments cheryl.xls"
start \Direct Payments DOT\"1 payments Sandra.xls"
start \Direct Payments DOT\"1 payments Liv.xls"
start \Direct Payments DOT\"1 payments Sally.xls"
start \Direct Payments DOT\"0.5 yearly payment planner.xls"
exit
'----------
Then click on file>save as
Give it the name "Start.bat"
And save it to your pen drive.
It may ask you if you are sure you want to change the file type but it is ok
Now double click the file Start.bat on your pen drive, it doesn't matter if
the drive letter is A or Z it will start all your files
Regards
Steve
OK sorry missed that bit, so the macro you have already starts when you
open
a file.
That macro should be in the ThisWorkbook section of your main workbook.
just replace that with
Privat Sub Workbook_Open()
If Len(Dir("f:\Direct Payments DOT\1 payments cheryl.xls")) > 0 Then
Workbooks.Open ("f:\Direct Payments DOT\1 payments cheryl.xls")
Workbooks.Open ("f:\Direct Payments DOT\1 payments Sandra.xls") '
Workbooks.Open ("f:\Direct Payments DOT\1 payments Liv.xls")
Workbooks.Open ("f:\Direct Payments DOT\1 payments Sally.xls")
Workbooks.Open ("f:\Direct Payments DOT\0.5 yearly paymentplanner.xls")
Else
Workbooks.Open ("g\Direct Payments DOT\1 payments cheryl.xls")
Workbooks.Open ("g\Direct Payments DOT\1 payments Sandra.xls") '
Workbooks.Open ("g\Direct Payments DOT\1 payments Liv.xls")
Workbooks.Open ("g\Direct Payments DOT\1 payments Sally.xls")
Workbooks.Open ("g\Direct Payments DOT\0.5 yearly paymentplanner.xls")
End If
End Sub
Regards
Steve
sure thing - and thanks for your attention to my problem, most
helpful to me
Private Sub Workbook_Open()
'Workbooks.Open ("f:\Direct Payments DOT\1 payments cheryl.xls")
'Workbooks.Open ("f:\Direct Payments DOT\1 payments Sandra.xls") '
Change as required
'Workbooks.Open ("f:\Direct Payments DOT\1 payments Liv.xls")
' Workbooks.Open ("f:\Direct Payments DOT\1 payments Sally.xls")
' Workbooks.Open ("f:\Direct Payments DOT\0.5 yearly payment
planner.xls") '
End Sub
John
or instead how can i get it to work with three ++ drives
example what do need to change
Private Sub Workbook_Open()
If Len(Dir("x:\Direct Payments DOT\1 payments cheryl.xls")) > 0 Then
Workbooks.Open ("x:\Direct Payments DOT\1 payments cheryl.xls")
Workbooks.Open ("x:\Direct Payments DOT\1 payments Sandra.xls")
Workbooks.Open ("x:\Direct Payments DOT\1 payments Liv.xls")
Workbooks.Open ("x:\Direct Payments DOT\1 payments Sally.xls")
Workbooks.Open ("x:\Direct Payments DOT\0.5 yearly payment
planner.xls")
Else
Workbooks.Open ("f:\Direct Payments DOT\1 payments cheryl.xls")
Workbooks.Open ("f:\Direct Payments DOT\1 payments Sandra.xls")
Workbooks.Open ("f:\Direct Payments DOT\1 payments Liv.xls")
Workbooks.Open ("f:\Direct Payments DOT\1 payments Sally.xls")
Workbooks.Open ("f:\Direct Payments DOT\0.5 yearly payment
planner.xls")
Workbooks.Open ("g:\Direct Payments DOT\1 payments cheryl.xls")
Workbooks.Open ("g:\Direct Payments DOT\1 payments Sandra.xls")
Workbooks.Open ("g:\Direct Payments DOT\1 payments Liv.xls")
Workbooks.Open ("g:\Direct Payments DOT\1 payments Sally.xls")
Workbooks.Open ("g:\Direct Payments DOT\0.5 yearly payment
planner.xls")
End If
End Sub
thanks John