cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

senddata and vba event

Former Member
0 Likes
205

Hi experts,

I face troubles while trying to use SAVEWORKSHEETDATA with Excel/VBA event Worksheet calculate -> excel crashed each time.

my codre below :


Private Sub Worksheet_Calculate()   


Dim EPMExample As New FPMXLClient.EPMAddInAutomation

 

        If Range("G22").Value = "SUBMITTED" Then
             MsgBox ("senddata") '-> works correctly


             EPMExample.SaveWorksheetData -> leads to excel crashed

              'Call SEND_DATAWS '-> leads to excel crashed
        End If


End Sub

Note: in G22 cell, there is an Excel Formula

Tks for your help,

Olivia

Accepted Solutions (0)

Answers (2)

Answers (2)

former_member186338
Active Contributor
0 Likes

Don't put your saving code into Excel/VBA event Worksheet calculate!!!

It will always crash!

Please explain what do you want to achieve!

Former Member
0 Likes

HI Olivia,

Are you trying to save only the G22 cell value in system? Is the template input enabled? What is the formula in G22? complex? Can you not use EPM function Save Data in case only one cell is involved?

Regards,

JP

Former Member
0 Likes

Hi JP,

In G22, I've an EPMWorkStatus() Formla.

Based on that status, I've send or not data to the data base tks to an EPMSaveData()

Regards

Former Member
0 Likes

How many records are passing? Without the VBA, just try to simply Save data from the EPM tab.....See whether still the Excel crashes..