Macro to change custom properties

The error is saying that you’re trying to access an element of an array that doesn’t exist. You’re accessing two arrays in this call, prpVal and sValue.

prpVal is explicitly declared as having two elements, so it’s not the problem.
sValue’s size is not declared. It’s created by the Split function. The split function takes the input and makes an array based on the delimiter “-”. The input of Split is one of the arguments of UpdateProperty. Assuming that the error is happening when updateProperty is being called from main(), its value is coming from the inputbox. So the value you type into the input box must contain a dash. Does it?

1 Like

Thanks, I forgot I needed to add the original number then the “-” and the new number. I have not used it in a while.

I might need to figure out how to use 2 input boxes, one for the number I want to replace and the second for the for the replacement value, that would be more intuitive