Forum Discussion
Excelworksprograms
May 30, 2022Copper Contributor
Type missmatch
Hi ive run into trouble in a weired situation of type mismatch error
There are two computers installed the same version and build and both 64 bit
When the vba code runs in the first it doesnt return any error but the same cone runs in thd other and returns type mismatch error what could ther root cause of thus problem be?
See if it works if you use
Wsabc.Cells(1,2).Value = Val(txtabc.Text)
If not: do the users where it fails use a different decimal separator than you (point vs comma)?
Can you click Debug in the error message and find out which line causes the problem?
- ExcelworksprogramsCopper ContributorI just found that a cells value is like this
Wsabc.cells(1,2).value=cdbl(txtabc) in which txtabc is on a user form the code runs by clicking a command button on the form
The problem is this code runs on my computer and some other but it gets to a type mismatch on another computer with same version and build of excelSee if it works if you use
Wsabc.Cells(1,2).Value = Val(txtabc.Text)
If not: do the users where it fails use a different decimal separator than you (point vs comma)?