gnaga
Well-known Member
- Joined
- Jul 9, 2002
- Messages
- 748
- Office Version
- 365
- 2016
- 2013
- Platform
- Windows
My current macro is running in say User-A login in the network PC. When I execute the follwoing line I get an error as User-A is not having access to view this file.
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.Getfile("//XXXXX/XXXXX/ABC.xlsm")
Set SrcBook = Workbooks.Open(f)
Just before executing this code can we supply the PC logon Username and password to another user say User-B who has the access to this file?
Finally I would like to revert back to User-A logon.
Set fso = CreateObject("Scripting.FileSystemObject")
Set f = fso.Getfile("//XXXXX/XXXXX/ABC.xlsm")
Set SrcBook = Workbooks.Open(f)
Just before executing this code can we supply the PC logon Username and password to another user say User-B who has the access to this file?
Finally I would like to revert back to User-A logon.