Saving to SharePoint

DPECK

New Member
Joined
Sep 4, 2014
Messages
31
I run several reports using macros and save them into SharePoint. I use the code below when saving. The issue I'm having is intermittent. As it starts the save process it stalls when the "Content Type" dialog box appears. If I close the dialog box by manually clicking on the X the macro moves on and the "Uploading to SharePoint" dialog box appears where it stalls again. If I let is set for a few seconds and click the X on the dialog box the macro finishes and the file actually is saved to the proper folder. Many times it saves without stalling. The first save is for historical records the second one overwrites a file that is linked to other places. Thank you in advance for your help.


VBA Code:
Function WebSave_DWOR()
Application.DisplayAlerts = False

     FilePath = "http://collab.company.com/facsec/mtvfacilities/PMO/documentation/Shared Documents/FMS/WEEKLY WO REPORTS/": NewName = FilePath & Format(Date, "YYYY-MM-DD") & " Demand Work Order Report" & ".xlsx"
     ActiveWorkbook.SaveAs Filename:=NewName, FileFormat _
     :=51, CreateBackup:=False
     FilePath = "http://collab.company.com/facsec/mtvfacilities/PMO/documentation/Shared Documents/FMS/": NewName = FilePath & "Daily Demand Work Order Report " & ".xlsx"
        ActiveWorkbook.SaveAs Filename:=NewName, FileFormat _
        :=51, CreateBackup:=False
         
Application.DisplayAlerts = True
ActiveWorkbook.Close

End Function
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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