Hi All,
I am having a bit of a unique problem with a database I am trying to create to improve processes at my work. I would like to open a shared Excel document using a button click and whilst this works perfectly on my own computer, the moment it is opened on a colleagues computer, the code breaks down due to how the file path on our computer system works. (it goes C:\Users\UsersName\SharepointDocuments). My current code is as per the below but please bare in mind that I am very new to access and may not understand complicated responses about specific VBA!
I hope the above makes sense, Let me know if you need further information! I am looking for a solution so that it will open on anyone's computer!
With Thanks,
M3opa
I am having a bit of a unique problem with a database I am trying to create to improve processes at my work. I would like to open a shared Excel document using a button click and whilst this works perfectly on my own computer, the moment it is opened on a colleagues computer, the code breaks down due to how the file path on our computer system works. (it goes C:\Users\UsersName\SharepointDocuments). My current code is as per the below but please bare in mind that I am very new to access and may not understand complicated responses about specific VBA!
Code:
Function OpenExcelComponentShortageR()
Dim MyXL As Object
Set MyXL = CreateObject("Excel.Application")
With MyXL
.Application.Visible = True
.Workbooks.Open "C:\Users\(MyName)\(Company Name)\(Company Name) Shared Documents - Documents\Planning Reports - under construction\(Company) CPP Files\Other Excel Files\Component Shortage Report.xlsx"
End With
End Function
I hope the above makes sense, Let me know if you need further information! I am looking for a solution so that it will open on anyone's computer!
With Thanks,
M3opa