Invalid L value?

Trying to convert from C# to VBA what am I doing wrong here? I’m trying to assign a value to the row of a dynamic date column, the original C# code worked.

C# - row[new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddMonths(1).AddDays(counter).ToString(“MM/dd/yyyy HH:mm:ss”)]

Hi,

I think you try to set this expression in OutArgument (To property of Assign activity?).
In general To property of Assign activity can be set only single variable. If you want to set this value to other variable, can you try to set this in Value property?

Regards,

Hey again :slight_smile:

I’m not quite sure I follow you as the code worked previously, I’m currently trying to convert everything from C# to VBA so I copied all the activities over from a C# project.


There appears to be no errors in the C# project whatsoever so I’m confused as to what I’m doing wrong :grimacing:

Hi,

Sorry, I had a little misunderstanding.
As it seems bug, for now, can you try the following as workaround?

tempStr=new DateTime(DateTime.Now.Year,DateTime.Now.Month,1).AddMonths(1).AddDays(counter).ToString("MM/dd/yyyy HH:mm:ss")

Then

row(tempStr) = 0

Regards,

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.