I am using the following VBA code to create about 70 Web pages after some other updates are made to the sheet using another script. This worked flawlessly for several weeks and now all the sudden it is taking up to 20 minutes just to generate the first page. My scheduler only allows 20 minutes before force closing the sheet so I don't know how long it would take to complete the entire script. It has gotten progressively worse though because when I first noticed it about 4 days ago, it was completing most of them in that same period of time.
I use this exact script in a couple other workbooks with less pages (7) and it takes about 20 seconds to complete. I have another workbook that is identical to this one that is doing the same thing.
I tried rebooting, I might upgrade to Office365 this weekend, but I am currently doing this in Excel 2016.
This is not the entire code, this same code continues for all 70 pages being created.
Any thoughts on why this is no longer running as it did before? Is there a better way to do this? I used to use the republish on Save feature before with the smaller workbook but it was only 7 sheets, that would be hard to manage on 70.
I use this exact script in a couple other workbooks with less pages (7) and it takes about 20 seconds to complete. I have another workbook that is identical to this one that is doing the same thing.
I tried rebooting, I might upgrade to Office365 this weekend, but I am currently doing this in Excel 2016.
Code:
Application.Sheets("5a1").Activate With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
"C:\Users\Brad\Documents\PR\BB\Schedules\Boys\5a1.htm", "5a1", "$A:$E", xlHtmlStatic, _
"", "")
.Publish (True)
End With
Application.Sheets("5a2").Activate
With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
"C:\Users\Brad\Documents\PR\BB\Schedules\Boys\5a2.htm", "5a2", "$A:$E", xlHtmlStatic, _
"", "")
.Publish (True)
End With
Application.Sheets("5a3").Activate
With ActiveWorkbook.PublishObjects.Add(xlSourceRange, _
"C:\Users\Brad\Documents\PR\BB\Schedules\Boys\5a3.htm", "5a3", "$A:$E", xlHtmlStatic, _
"", "")
.Publish (True)
End With
Any thoughts on why this is no longer running as it did before? Is there a better way to do this? I used to use the republish on Save feature before with the smaller workbook but it was only 7 sheets, that would be hard to manage on 70.