AnsweredAssumed Answered

Problem with cell reference in PIPutVal

Question asked by JanWortmann on Aug 28, 2019
Latest reply on Aug 29, 2019 by JanWortmann

Hi all,

 

I want to use the PIPutVal-function to send a string from Excel to an AF Attribute.

 

Set ResultCell = Range("FQ3")
Set ValueCell = Range("FR3")
AFRoot = "\\SRV084\Kuraray\KEG\Frankfurt\Poval\Production\P1|ProcessData|Type
AFAttr = "Next_Type"    'Range("B5").Value 
timestamp = Format("*", "dd-mmm-yy hh:mm:ss")
macroresult = Application.Run("PIPutVal", AFAttr, ValueCell, timestamp, AFRoot, ResultCell)

 

This all works fine when the content of "FR3" is a clear string.

But sometimes I need to send a string linke "3-85" and Excel interprets this as a date March 1985.

The cell itself is formated as "Test" and shows the string "3-85".

 

But the Range Object "ValueCell"  still does that date interpretation to March 1985 = 31107.

 

Has anyone an idea how I could help myself with that issue?

 

Thanks

Jan

 

Outcomes