VISHAL120
08-30-2011, 07:22 AM
Hi,
Am actually using this code to connect to different workbook on network :
Wip_file_accessible = False
On Error GoTo After_File_Test
'office connection
'OPENING THE WIP >>"
' Workbooks.Open Filename:="\\130.1.1.138\factory_wip\KNITTING_WIP\Critical_Path_PM_6.xls", ReadOnly:=True
'HOME CONNECTION
Workbooks.Open Filename:="C:\Users\user\Documents\vishal\vs_files\FACTORY_WIP\KNITTING_WIP\Critical_P ath_PM_6.xls", ReadOnly:=True
Wip_file_accessible = True
After_File_Test:
If Not (Wip_file_accessible) _
Then
MsgBox ("Wip <<KNITTING>> File Not accessible;Connection Problem !! ")
GoTo Exit_Sub_2
End If
and my main problem is everytime i bring this to work at home i shall go on the code and change the connection to home or so that i can work otherwise it don't wory for test updates.
is there a way that i can keep the connection on a sheet cell like
in cell B3 : "C:\Users\user\Documents\vishal\vs_files\FACTORY_WIP\KNITTING_WIP\Critical_P ath_PM_6.xls", ReadOnly:=True
And address the connection to take the path on the cell and continue.
As actually i have to change approximate 10 connections like this so that i can continue to program this at home and this is very very time consuming.
Please find attached of an example of how it should be. By this by can just copy my home connection aside and paste for each dept and continue to work normally.
Thanks to help if this is possible to do.
Am actually using this code to connect to different workbook on network :
Wip_file_accessible = False
On Error GoTo After_File_Test
'office connection
'OPENING THE WIP >>"
' Workbooks.Open Filename:="\\130.1.1.138\factory_wip\KNITTING_WIP\Critical_Path_PM_6.xls", ReadOnly:=True
'HOME CONNECTION
Workbooks.Open Filename:="C:\Users\user\Documents\vishal\vs_files\FACTORY_WIP\KNITTING_WIP\Critical_P ath_PM_6.xls", ReadOnly:=True
Wip_file_accessible = True
After_File_Test:
If Not (Wip_file_accessible) _
Then
MsgBox ("Wip <<KNITTING>> File Not accessible;Connection Problem !! ")
GoTo Exit_Sub_2
End If
and my main problem is everytime i bring this to work at home i shall go on the code and change the connection to home or so that i can work otherwise it don't wory for test updates.
is there a way that i can keep the connection on a sheet cell like
in cell B3 : "C:\Users\user\Documents\vishal\vs_files\FACTORY_WIP\KNITTING_WIP\Critical_P ath_PM_6.xls", ReadOnly:=True
And address the connection to take the path on the cell and continue.
As actually i have to change approximate 10 connections like this so that i can continue to program this at home and this is very very time consuming.
Please find attached of an example of how it should be. By this by can just copy my home connection aside and paste for each dept and continue to work normally.
Thanks to help if this is possible to do.