There is an excel document in which floating-point numbers are stored in the cells. I try to count them, but I get the error "Type mismatch":
"Run-time error '13': Type mismatch".
For example, in the cells the following data:
A1: 1,00 B1: 25,17 A2: 3,00 B2: 133.67 I'm trying to count these numbers like this:
Dim Count As Double Dim Cost As Double Dim Summ As Double For i = 1 To LastRowOpenDbfSheet (Цикл с первой до последней строки в документе) Count = sheetOpenDbf.Cells(i, 12) // Так не работает Count = sheetOpenDbf.Cells(i, 12).Value // Так не работает Count = CDbl(sheetOpenDbf.Cells(i, 12)) // Так не работает Then these numbers Count, Cost need to be multiplied. What is the correct data type to specify and how to read the values in the cells so that it would work and you could then multiply the numbers?
StrCount, StrCost- where is it in your description?Set- assignment to an object variable. Why do you need it? InВ2value with a dot - is it? - vikttur