Skip to main content
Support is Online
We're back! We are here to assist you. Please be patient, we will respond to your tickets shortly.
Official support hours
Monday To Friday
From 09:00 To 17:30
  Tuesday, 25 June 2019
  0 Replies
  3.7K Visits
0
Votes
Undo
Hi,

I am building a string from various constants and variables. This string I am evaluating using the named variable and also by VBA function. But none of them worked. One gives me #REF error and the other #VALUE error.

I built the string like this =AC20&AC18 in AC24 cell and the output is like this 'G:\Crush\Daily plant reports\2019\[05-2019.xls]C vol'!$F$35

In the name manager, I created a function like this =EVALUATE('C vol'!$AC$24) which I named as Eval

In another cell, I called Eval and it displays #REF error.

I wrote a function in VBA like this
Public Function myEvaluate(aString) As Variant
On Error Resume Next
Application.Volatile
myEvaluate = Evaluate(aString)
On Error GoTo 0
End Function

In another cell, I called this function as = myEvaluate(AC24) which gives me #VALUE error.

So no idea where is the mistake in syntax.
There are no replies made for this post yet.