0
Sub Test()
myURL = "http://sps.ap.emersonprocess.com/sg/pssops/svcops/APServicePortal/ChartTemplates/IBS-CCR-AP_Prod.xlsx"
Filename = "IBS-CCR-AP_Prod.xlsx"
myURL = Replace(myURL, "http:", "")
myURL = Replace(myURL, "/", "\")
MsgBox FileDateTime(myURL & Filename)

end Sub

Can you review my codes I just wanted to know the when "IBS-CCR-AP_Prod.xlsx" saved in a sharepoint drive, thats why I used FileDateTime but unfortunetly I had an error path not found. Thanks Big Regards

1
  • Try \\sps.ap.emersonprocess.com\sg\pssops\svcops\APServicePortal\ChartTemplates\IBS-CCR-AP_Prod.xlsx Commented Jan 26, 2015 at 11:41

1 Answer 1

2

myURL already contains your filename, you needn't concatenate it, simply use

MsgBox FileDateTime(myURL)
Sign up to request clarification or add additional context in comments.

5 Comments

If I remove the Filename at concatinate it's still an error on the path "myURL".
@EJ_all_the_way then try to open the value of myUrl with your windows explorer, if it's not possible then your link/path is not correct
@katz When it comes to Workbook.Open(myUrl) without Replacing any string it works in saving... but when I used the fileDateTime I'm having an error. (Invalid procedure call or agurment)
There has got to be some other error if your error message goes like that. Check for typos, you may provide an undeclared mistyped argument, that evaluates to Empty. You may also choose to use Option Explicit learn.microsoft.com/en-us/dotnet/articles/visual-basic/…
I got it... @ignotus thanks for the fact that i need to used always Option Explicit.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.