Posted to microsoft.public.excel.programming
|
|
Cdbl and Cstr with a "Type Mismatch" Error
The error suggests that you don't have numbers in your cells and one or more
contains text.
--
Regards
Dave Hawley
www.ozgrid.com
"Philosophaie" wrote in message
...
Sub This()
Dim A,B,C as Double
Dim S as String
With Sheets("Sheet1")
A=.cells(1,1)
B=.cells(1,2)
C=.cells(1,3)
S=.cells(1,4)
End With
End Sub
This worked one time after that a "Type mismatch" error. Tried these
solutions but none worked:
A=Cdbl(.cells(1,1))
B=Cdbl.cells(1,2))
C=Cdbl(.cells(1,3))
S=Cstr(.cells(1,4))
A=.cells(1,1).Value
B=.cells(1,2).Value
C=.cells(1,3).Value
S=.cells(1,4)
Where am I going wrong?
|