Hello Friends,
I am using the below code to open onedrive file and copy data from that file and paste into the excel file
The code requires a sign in to access the file.
The data is in my account and the other person is not able to open the file from his account.
So in order for the other person to access the data (open the file) he needs my id & pw to open the file.
Is there a way to bypass the sign in method. Like some way that would not require to sign in
If not then is there a a way that I can open the file URL of that file and copy data from that web browser in which the file is present and copy data from there and paste it in excel.
Regards,
Humayun
I am using the below code to open onedrive file and copy data from that file and paste into the excel file
VBA Code:
Sub call_file_from_cloud()
On Error GoTo ErrMsg
Workbooks.Open Filename:= _
"https://d.docs.live.net/xxxxxxxxxxxxxxxx/Documents/One%20Drive.xlsx", ReadOnly:=True
Cells.Select
Selection.Copy
Windows("call macro from.xlsm").Activate
Range("A1").PasteSpecial Paste:=xlPasteValues
Windows("One Drive.xlsx").Activate
Worksheets("Sheet2").Select
Range("A1").Copy
Windows("call macro from.xlsm").Activate
Range("B1").PasteSpecial Paste:=xlPasteValues
Windows("One Drive.xlsx").Activate
Application.CutCopyMode = False
Windows("One Drive.xlsx").Close
Exit Sub
ErrMsg:
MsgBox ("Please sign in to your microsoft account to call data from CLOUD."), , "SIGN IN REQUIRED"
End Sub
The code requires a sign in to access the file.
The data is in my account and the other person is not able to open the file from his account.
So in order for the other person to access the data (open the file) he needs my id & pw to open the file.
Is there a way to bypass the sign in method. Like some way that would not require to sign in
If not then is there a a way that I can open the file URL of that file and copy data from that web browser in which the file is present and copy data from there and paste it in excel.
Regards,
Humayun