A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Problem solved. No need to answer! :)
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
When I launch my task, this is the error I get in Excel:
This seems to be because the Power Query add-on hasn't fully loaded yet. This is my assumption for two reasons, #1, when I hit debug I can push "run" and it will finish the macro without issue (pushing debug seems to allow Excel to finish loading the add-on). #2, I can see in the ribbon that the Power Query section isn't there when the error pops up, but it is there after I push debug.
I have also tried adding a delay, but the delay seems to also delay the add-on being loaded as well
Below is my code, any help is going to be great!
Thanks,
Private Sub Workbook_Open()
'Application.Wait Now + #12:00:30AM#
Application.DisplayAlerts = False
ActiveWorkbook.RefreshAll
ActiveSheet.Copy
With ActiveSheet.UsedRange
.Copy
.PasteSpecial xlValues
.PasteSpecial xlFormats
End With
Application.CutCopyMode = False
ActiveWorkbook.SaveAs "C:\TEST"
ActiveWorkbook.Close False
Application.Quit
End Sub
A family of Microsoft spreadsheet software with tools for analyzing, charting, and communicating data.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Problem solved. No need to answer! :)