J
Jake
I am using the following code to retrieve text from a frame
Function GetValue() As Singl
Dim frm As Fram
Dim frmChoice As Fram
Dim intLCV As Intege
Dim strNewString As Strin
Dim varHolder As Varian
For Each frm In Frame
If frm.HorizontalPosition = 138.3 The
frm.Selec
Set frmChoice = fr
End I
Next fr
For intLCV = 1 To Len(frmChoice.Range.Text
If Mid(frmChoice.Range.Text, intLCV, 1) <> "," The
strNewString = strNewString & Mid(frmChoice.Range.Text, intLCV, 1
End I
Next intLC
varHolder = CSng(strNewString
GetValue = varHolde
Set frm = Nothin
Set frmChoice = Nothin
End Functio
The line varHolder = CSng(strNewString) keeps returning an error. The value of strNewString is " 6271.84" (yes, there is a leading space) and I can't for the life of me figure out why there is a problem. I have also tried first setting varHolder to the value of strNewString, then converting to a single to no avail
Any ideas why this isn't working
Thanks
Jake
Function GetValue() As Singl
Dim frm As Fram
Dim frmChoice As Fram
Dim intLCV As Intege
Dim strNewString As Strin
Dim varHolder As Varian
For Each frm In Frame
If frm.HorizontalPosition = 138.3 The
frm.Selec
Set frmChoice = fr
End I
Next fr
For intLCV = 1 To Len(frmChoice.Range.Text
If Mid(frmChoice.Range.Text, intLCV, 1) <> "," The
strNewString = strNewString & Mid(frmChoice.Range.Text, intLCV, 1
End I
Next intLC
varHolder = CSng(strNewString
GetValue = varHolde
Set frm = Nothin
Set frmChoice = Nothin
End Functio
The line varHolder = CSng(strNewString) keeps returning an error. The value of strNewString is " 6271.84" (yes, there is a leading space) and I can't for the life of me figure out why there is a problem. I have also tried first setting varHolder to the value of strNewString, then converting to a single to no avail
Any ideas why this isn't working
Thanks
Jake