I have tried to resolve the issue with no luck. Any ideas why I would get a type mismatch. Here are the facts.
UserForm TextBox Controls and Values
txtID = 225
txtDate = 09/09/2001
txtName = John Doe
[vba]
Dim MyData as Range
Dim VaInfo as Variant
Public Sub ChangeInfo_Click()
Call MyChanges
With Range("MyInfo")
Set MyData = .Rows(2)
End With
End Sub
Public Sub MyChanges()
VaInfo(1, 1) = txtID.Value
VaInfo(1, 2) = txtDate.Value
VaInfo(1, 3) = txtName.Value
MyData.Value = VaInfo
End Sub
[/vba]
When step through the code I notice the data is correct after the equal sign under the Public Sub MyChanges(). But I get the following error when I point on the left side of the equal sign.
VaInfo(1,1) = <Type Mismatch>
Does anyone have any ideas?