Dim FullName As String
FirstInitialLetter = Mid(LTrim(RTrim(FullName)), 1, 1) & "_" & "score"
Dim score As Double = FirstInitialLetter
My program has a set of double variables A_score, B_Score,...,Z_score and I am trying to fetch the correct
variable based on the first letter of the fullname,i.e, if FullName='Robert Dunn' then the FirtInitialLetter reduces to R_score as a string and I was hoping to be able to extract the corresponding double variable called R_score's value into score. But I get the error: Cant cast a string as a double in line 3. It is misinterpreting the FirstinitialLetter as a string and I want it to read it as a variable name. Please help!!