I receive a type-mismatch error from VBA on one computer, but not on others. Why?
I have an Excel file with macro. In this file, there is a user form. In the form, there is a Textbox. I call the user form "MyForm" and the TextBox "MyTextBox".
I also have a module. In this module there is a subroutin开发者_如何学Pythone like this
Sub MySub(s As String)
MyForm.MyTextBox.Value = s
...
End Sub
On most computers, the code above has no problem, while on one computer, it raises the type mismatch error. Can you explain this?
Please help me. I'm very frustated.
Many thanks in advance,
Haris
Some things you could check (most of them obvious, I know).
-Versions of the spreadsheet between the various PCs.
-Culture on the problem PC
-Data on the problem PC
-The form being used with other forms/macros who also have a variable defined as "s"
What kind of data is usually entered into the textbox?
精彩评论