Summary of the Problem
I am attempting to create a database for stocks that I value and have hit a snag. I am attempting to create a robust data entry sheet that makes the process easier, I am doing so by utilizing VBA. I am trying to use the "stocks" datatype function to copy over the stock ticker into the database using the following line:
.Cells(iRow, 3).Value = frm.Range("F5").Value
However when it gets copied over to the database it spits back the #VALUE! error.
What I have Tried
I attempted to specify the RangeValueDataType but that didn't seem to be what I was looking for. I also tried changing the Range syntax to .Value2 along with .ConvertToLinkedDataType, the ladder changed the end output in the database from #VALUE! to "TRUE".
Additional Code
This is the code from the beginning of the sub that may shed some light on what is happening:
Dim frm As Worksheet
Dim database As Worksheet
Dim iRow As Long
Dim iSerial As Long
Set frm = ThisWorkbook.Sheets("input")
Set database = ThisWorkbook.Sheets("database")
If Trim(frm.Range("L1").Value) = "" Then
iRow = database.Range("B" & Application.Rows.Count).End(xlUp).Row + 1
If iRow = 2 Then
iSerial = 1
Else
iSerial = database.Cells(iRow - 1, 2).Value + 1
End If
Else
iRow = frm.Range("K1").Value
iSerial = frm.Range("L1").Value
End If
My understanding of VBA is super rudimentary so I am sure it is something simple I just don't understand about the functions I am utilizing. Any help whatsoever is greatly appreciated, Thanks!