imagoodwon
Technical User
Hi:
Not too well versed on this stuff!
I have a userform that gets populated by the user selecting values from a Listbox
I read values into some textboxes like this
Private Sub ListBox1_Change()
Set SourceRange = Range(ListBox1.RowSource)
TextBox1 = ListBox1.Value
TextBox2 = SourceRange.Offset(ListBox1.ListIndex, 1).Resize(1, 1).Value
TextBox3 = SourceRange.Offset(ListBox1.ListIndex, 2).Resize(1, 1).Value
Now I want to post values back to the worksheet based on the value currently selected in the ListBox. The new data is entered in Textboxes 6 -12
I've tried something like this
SourceRange.Offset(ListBox1.ListIndex, 2).Resize(1, 1).Value=TextBox6.Value
and
ListBox1.RowSource.Offset(0, 6).Value = TextBox6.Text
all of which gives me an error
Object required (Error 424)
Object required
Can anyone please suggest a workable solution.
Thanks
Not too well versed on this stuff!
I have a userform that gets populated by the user selecting values from a Listbox
I read values into some textboxes like this
Private Sub ListBox1_Change()
Set SourceRange = Range(ListBox1.RowSource)
TextBox1 = ListBox1.Value
TextBox2 = SourceRange.Offset(ListBox1.ListIndex, 1).Resize(1, 1).Value
TextBox3 = SourceRange.Offset(ListBox1.ListIndex, 2).Resize(1, 1).Value
Now I want to post values back to the worksheet based on the value currently selected in the ListBox. The new data is entered in Textboxes 6 -12
I've tried something like this
SourceRange.Offset(ListBox1.ListIndex, 2).Resize(1, 1).Value=TextBox6.Value
and
ListBox1.RowSource.Offset(0, 6).Value = TextBox6.Text
all of which gives me an error
Object required (Error 424)
Object required
Can anyone please suggest a workable solution.
Thanks