Skip to Content
0
Former Member
Jan 05, 2018 at 03:31 PM

VBA Macro to upload each sheet in EPM addin

140 Views

Dear Friends,

I working on automating upload of data through EPM- demand planning add-in. I have 33 sheets each sheet have set of data to be uploaded and mounts to more than 1000 data points. Currently I have to individually got to each sheet and click on upload button, which is highly manual and time consuming.

I have written macro to upload the whole workbook but in-between the upload the excel is getting crashed. So I'm looking a way to upload each sheet one by one.

Macro code:-

Sub Upload()
Dim ws As Worksheet, flg As Boolean
For Each ws In Sheets
ws.Select
EPMexample.SaveAndRefreshWorksheetData
Next
End Sub

But the challenge is I have to click ok for every sheet in the workbook

Is there a way to automatically click ok every time or to upload the entire workbook at once ?

Thanks you !!

Attachments

evusm.png (17.1 kB)
7rvo0.png (24.8 kB)