HELLo all
i'm kinda newb in VB and i tried using the codes above (adapting them of course) to enable editing called cells from the textbox, but i had no luck at all
i was thinking that maybe it was because of the way i called the info into the listbox
each line of the listbox was added like this:
i = ListBox1.ListIndex
modelrow = range("A2:A1500").Find(what:=(ListBox1.List(i)), MatchCase:=True).Row
TypeCol = ActiveSheet.range("A2:ZZ2").Find(what:="Type", MatchCase:=True).Column
InfTypeValue = Application.index(Sheet3.range("A1:ZZ1500"), modelrow, TypeCol)
ListBox2.AddItem InfTypeValue
this is how've i've been adding so far, then i added this:
Private Sub ListBox1_Click()
txtRank.Value = ListBox1.Value
End Sub
Private Sub txtRank_Change()
Dim rCell As Range
With ListBox
Set rCell = Range(.RowSource).Offset(.ListIndex).Resize(1)
rCell.Value = txtRank.Value
End With
End Sub
but it throws me error in this line:
Set rCell = Range(.RowSource).Offset(.ListIndex).Resize(1)
what should i do?
Bookmarks