Macros not working from Share Point Site

Pat_The_Bat

Board Regular
Joined
Jul 12, 2018
Messages
83
Our IT department just migrated all of our data to a SPS and then I have a mapped local drive that references that location. Every Client Wkbk I open has a user authentication dialogue that's called on opening the workbook. Every time I go to open a Wkbk, I get a run time error.
At first I thought it was my code, but then when I saved a copy locally and opened without issue I realized that it must be the SPS. I started researching this and sure enough it appears to be pretty widely known that you macros don't work on SPS.
I saw some documentation that suggests changing a setting to open in IE explorer, but that's not going to work in this application. I need to be able to open those Excel Workbooks locally on my computer (By clicking on the file in the mapped windows drive) and have the Macros run effectively.

Anyone know how to resolve this problem?
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
Don't know if this is an option but instead of mapping the drive, "sync" the SharePoint files with OneDrive

Then you can reference them like:

Code:
Dim oneDriveFolder As String

oneDriveFolder = Environ("UserProfile") & "\OneDrive\Folder
 
Upvote 0
Don't know if this is an option but instead of mapping the drive, "sync" the SharePoint files with OneDrive

Then you can reference them like:

Code:
Dim oneDriveFolder As String

oneDriveFolder = Environ("UserProfile") & "\OneDrive\Folder


I was thinking this was some sort of setting issue in SPS. Are you saying I should go into all the Excel workbooks that are not opening properly because they are on SPS and change their code?

I don't understand where you would put that code snippet???
 
Upvote 0
Ignore the code if it's not needed, I use it to reference between workbooks in the OneDrive directory.

Syncing the SharePoint locally is just an alternative to mapping the drive and won't require authentication when opening every file.
 
Upvote 0
Ignore the code if it's not needed, I use it to reference between workbooks in the OneDrive directory.

Syncing the SharePoint locally is just an alternative to mapping the drive and won't require authentication when opening every file.

Okay, I'm with you. I'll present that to them. My concern is that they are going to say it's a pretty massive amount of data and the sync could be pretty massive. We'll see. Thanks for your input.

The Workbooks require authentication because I programmed them to require authentication. It's not the SPS that is asking for authentication. It's the macro in the workbook. That macro is coded to make every user authenticate when they open those workbooks so that people can't steal the workbook and take it to a competitor. They can take the workbook, but as soon as they try to use it elsewhere, it's not going to work and will be useless to them.

So I guess what I'm saying is, I do want them to have to authenticate when they open the workbook.
There is some problem with the macro running on the file from the SPS. Maybe if they are synced, then the file is local and the macro will work. Lot of data to sync though. Ugh
 
Upvote 0
When you sync it doesn't actually download every file. You can see everything but files are only downloaded locally on open.
 
Upvote 0

Forum statistics

Threads
1,224,828
Messages
6,181,204
Members
453,022
Latest member
RobertV1609

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top