I am trying to open a document with vba. below is the code I have.
while no getting a error message, the document no opening. I tried "o:" and \\dfs.com\root\
while no getting a error message, the document no opening. I tried "o:" and \\dfs.com\root\
Code:
Dim Open_Aspect_Sheet_Check_Open As String
Dim xWb As Workbook
On Error Resume Next
Set xWb = Application.Workbooks("Aspect Inbound Stats (All).xlsx")
If xWb Is Nothing Then
Workbooks.Open Filename:="O:\Operational Reporting\Aspect\Aspect Inbound Stats (All).xlsx, ReadOnly:=True"
Else
Windows("Aspect Inbound Stats (All).xlsx").Activate
ActiveWorkbook.Close savechanges:=False
Workbooks.Open Filename:="O:\Operational Reporting\Aspect\Aspect Inbound Stats (All).xlsx", ReadOnly:=True
End If