views:

56

answers:

1

Hi,

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 subroutine 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

+1  A: 

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?

SteveCav