hi sir i have a code here but when i use the path on network the code can't find it but if i use a path not on network it works fine
the Bold code is the network path,
Sub Submit() Application.ScreenUpdating = False
Dim wbk As Workbook
Dim Fname As String
Dim pth As String
Dim Addr As String
pth = "\\LIZASOTSSERVER\LizasoTSNetworkFiles\RUBY LULAY Daily Report"
Fname = "Sales Check Online.xlsx"
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=8, Criteria1:= _
">0"
Range("Table1[[Invoice Date]:[Time Date]]").Select
Selection.Copy
Addr = Selection.Address
If Not wbkExists(Fname) Then
Set wbk = Workbooks.Open(pth & Fname)
Else
Set wbk = Workbooks(Fname)
End If
ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Select
Do While ActiveCell = Empty
ActiveCell.Offset(-1, 0).Select
Loop
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
''wbk.Sheets("Sales").Range("D5").PasteSpecial
ThisWorkbook.Activate
ActiveSheet.ListObjects("Table1").Range.AutoFilter Field:=8
ActiveSheet.ListObjects("Table2").Range.AutoFilter Field:=8, Criteria1:= _
">0"
Range("Table2[[Check or Acknowledgement]:[Time Date]]").Select
Selection.Copy
''Range("Table5[QTY]").Copy
Workbooks("Sales Check Online.xlsx").Activate
Worksheets("Payment Receive").Activate
ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Select
Do While ActiveCell = Empty
ActiveCell.Offset(-1, 0).Select
Loop
ActiveCell.Offset(1, 0).Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
ThisWorkbook.Activate
ActiveSheet.ListObjects("Table2").Range.AutoFilter Field:=8
wbk.Application.DisplayAlerts = False
wbk.Save
wbk.Close
''Sheets("Input").Activate
''Sheets("Input").Calculate
End Sub
the Bold code is the network path,