Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 07-11-2023, 09:09 AM
tispivey tispivey is offline VBA Macro running, but not saving to Sharepoint Windows 11 VBA Macro running, but not saving to Sharepoint Office 2021
Novice
VBA Macro running, but not saving to Sharepoint
 
Join Date: Mar 2022
Posts: 4
tispivey is on a distinguished road
Default VBA Macro running, but not saving to Sharepoint

I have some macros that I use to run daily reports. I did not build them.

I can read and edit macros as needed, but have not mastered building yet.



The problem I am running into is that they run, but are not posting to a Sharepoint site I use. The file opens from the site, acts like it is running, but is not saving back to Sharepoint.

Is there anything in the macro below that would cause it to not save once it finishes updating the report?

I apologize for the format, I am not sure how to properly post a macro here.

Sub PENDING_TC() ' ' PENDING_TC Macro ' ' Dim I As Integer Workbooks.Open Filename:= _ "http://mccportal/sites/techops/Daily%20Reports/PENDING%20TROUBLECALLS.xlsb" _ , UpdateLinks:=3 ActiveWorkbook.LockServerFile Application.ScreenUpdating = False Application.Calculation = xlCalculationManual 'Copies over pervious TC Pending Count Sheets("Historical").Select Columns("D:D").Select Selection.Insert Shift:=xlToRight Range("C4:C43").Select Selection.Copy Range("D4:D43").Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False Range("D3") = ("=c3-1") ActiveSheet.Cells(3, 4).Select Selection.Copy ActiveSheet.Cells(3, 4).Select Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Application.CutCopyMode = False 'Copies over pervious day(s) pending % ' Sheets("Pending Rpt %").Select ' Columns("G:G").Select ' Selection.Insert Shift:=xlToRight ' Columns("F:F").Select ' Selection.Copy ' Range("G1").Select ' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ ' :=False, Transpose:=False ' Range("G2").Select ' ActiveCell = "=TODAY()" ' ActiveCell.Copy ' Range("G2").Select ' Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ ' :=False, Transpose:=False 'This enters the updated data and enters formulas Sheets("TC PENDING (OW)").Select Columns("A:AW").Select Selection.ClearContents Workbooks.Open Filename:= _ "\\IAALCLUN02\userhome\PUBLIC\NC Finance\Billing Services\Daily Techops Reports\PENDING TC ALL PRINS " & Format(Date, "MM-DD-YY") & ".xls" 'CHG FROM OWEN FLDR TO KIRK "\\IAALCLUN02\userhome\PUBLIC\NC Finance\Daily Work Orders\Work Orders " & Format(Date, "M-D") & "\TC PENDING " & Format(Date - 1, "MMDD") & ".xls" Columns("A:AO").Select Selection.Copy Windows("PENDING TROUBLECALLS.xlsb").Activate ActiveSheet.Paste Application.CutCopyMode = False I = 2 Range("AP1") = "REGION" Range("AQ1") = "SYSTEM" Range("AR1") = "AREA" Range("AS1") = "TOM" Range("AT1") = "SCH'D WEEKDAY" Range("AU1") = "AGED (FROM CREATE)" Range("AV1") = "TOS" Range("AW1") = "COUNT" Do While Range("A" & I) <> "" Range("AP" & I).Formula = "=VLOOKUP(VALUE(CONCATENATE($B" & I & ",$C" & I & ")),'[Master Information Lookup.xlsx]SpaInfo'!$D:$P,9,0)" Range("AQ" & I).Formula = "=VLOOKUP(VALUE(CONCATENATE($B" & I & ",$C" & I & ")),'[Master Information Lookup.xlsx]SpaInfo'!$D:$P,13,0)" Range("AR" & I).Formula = "=VLOOKUP(VALUE(CONCATENATE($B" & I & ",$C" & I & ")),'[Master Information Lookup.xlsx]SpaInfo'!$D:$P,3,0)" Range("AS" & I).Formula = "=VLOOKUP(VALUE(LEFT($O" & I & ",5)),'[Master Information Lookup.xlsx]TomTos>Zip'!$E:$I,5,0)" Range("AT" & I).Formula = "=IF(Y" & I & ">1,VLOOKUP(WEEKDAY(Z" & I & "),$BC$1:$BD$7,2,0),"" "")" Range("AU" & I).Formula = "=(TODAY()-W" & I & ")" Range("AV" & I).Formula = "=VLOOKUP(VALUE(AB" & I & "),'[Master Information Lookup.xlsx]Tech #s'!$A:$C,3,0)" Range("AW" & I).Formula = "=COUNT(A" & I & ")" I = I + 1 Loop Application.Calculation = xlCalculationAutomatic Application.ScreenUpdating = True Sheets("Historical").Select Range("C11").Select ActiveSheet.PivotTables("PivotTable13").PivotCache .Refresh ActiveWorkbook.Save ActiveWindow.Close ActiveWindow.Close End Sub
Reply With Quote
  #2  
Old 07-12-2023, 03:11 AM
Pecoflyer's Avatar
Pecoflyer Pecoflyer is offline VBA Macro running, but not saving to Sharepoint Windows 10 VBA Macro running, but not saving to Sharepoint Office 2021
Expert
 
Join Date: Nov 2011
Location: Brussels Belgium
Posts: 2,779
Pecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant futurePecoflyer has a brilliant future
Default

Hi
you should have been better off posting in the VBA section.
Also use code tags around code # button. Thx
__________________
Did you know you can thank someone who helped you? Click on the tiny scale in the right upper hand corner of your helper's post
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA Macro running, but not saving to Sharepoint Macro not running Ulodesk Word VBA 2 08-13-2019 12:46 PM
issue in running macro in mac expert4knowledge Word VBA 5 08-13-2014 02:33 PM
Create a SharePoint site macro Fredrik Misc 0 10-25-2012 12:49 AM
VBA Macro running, but not saving to Sharepoint Sharepoint, Template and Macro related issue Samiksha Word 1 08-03-2012 03:04 AM
VBA Macro running, but not saving to Sharepoint Running a Macro in a protected form yessmarie Word VBA 1 05-25-2012 12:04 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:25 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft