How about,
Set Cel = Range(ComboBox1.ListIndex,
17).Offset(Mid(Combobox2).Value,6,2+8,17)
Cel.Value = Me.TextBox1.Text
Not really surely where you put the values, but hopefully that gets you
started.
--
HTH
Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
"Stift " wrote in message
...
I've got a Combobox1 in a userform which contains the values of
C9:C63.
My Combobox2 says the numbers of the week.
I've also got a text form.
Now I want that if the user select a column in Combobox1 and select a
weeknummer in Combobox2, and type a value in the textbox and press de
CommandButton.The content of the textbox must be fill in in the right
cell.
Everything seems to work but only the if statement i don't know what
do to:
What must I type in the source of the CommandButton???
Something like this :
If ComboBox2.RowSource = "Week 1" Then
Set Cel = Cells(9 + ComboBox1.ListIndex, 17)
Cel.Value = _
Me.TextBox1.Text
End If
If ComboBox2.RowSource = "Week 2" Then
Set Cel = Cells(10 + ComboBox1.ListIndex, 17)
Cel.Value = _
Me.TextBox1.Text
End If
But then it's now quite working.
Please Heeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeelllp me !!!
---
Message posted from http://www.ExcelForum.com/