K
Kevin
I have data in a userform I want to write back to the
worksheet. I have defined the array and varient variables
to populate the interface, and now want to write the user
changes back. I get a data-type mismatch when I try to
run my test (I only coded one textbox as a test, and it
failed). It fails on the line setting the vaData =
textbox value. When I step through the code below, and
list vaData in the watches, it lists it as a
varient/integer, rather than varient/string. How do I fx
this, what did I do wrong?
Sub SaveAEData()
Dim rgData As Range
Dim vaData As Variant
ThisRow = ActiveCell.Row
Set rgData = Range(Cells(ThisRow, 1), Cells(ThisRow, 65))
vaData(1, 39) = MedWatch1.TextBox5
rgData = vaData.Value
End Sub
thanks
Kevin
worksheet. I have defined the array and varient variables
to populate the interface, and now want to write the user
changes back. I get a data-type mismatch when I try to
run my test (I only coded one textbox as a test, and it
failed). It fails on the line setting the vaData =
textbox value. When I step through the code below, and
list vaData in the watches, it lists it as a
varient/integer, rather than varient/string. How do I fx
this, what did I do wrong?
Sub SaveAEData()
Dim rgData As Range
Dim vaData As Variant
ThisRow = ActiveCell.Row
Set rgData = Range(Cells(ThisRow, 1), Cells(ThisRow, 65))
vaData(1, 39) = MedWatch1.TextBox5
rgData = vaData.Value
End Sub
thanks
Kevin