Hi R
If I understand your needs then see if this get you started:
Private Sub CommandButton1_Click()
On Error Resume Next
Dim Cel As Range
' the Q cell:
Set Cel = Cells(9 + ComboBox1.ListIndex, 17)
MsgBox Cel.Address
'the weeknumber column:
Set Cel = Cells(9 + ComboBox1.ListIndex, 16 + Val(TextBox1.Text))
MsgBox Cel.Address
End Sub
HTH. Best wishes Harald
"Stift " skrev i melding
...
Hi
I've created a userform with VBA where the user can select a
value from a Combobox.The rowsource is :Database!C9:C63.
Now I want that the user can select a value from this Combobox,
then fill in something in the textbox.
When the user press Commandbutton the value typed in the textbox must
me put in the cell linked to the cell from the combobox but a few
colums further(Q9:Q63).
The colums Q7 till BQ7 are filled with the numbers 1 till 53
representing the numbers of the week.In the userform I want a textbox
where the user can fill in the weeknumber and then going to add values
in that column with the Combobox, textbox and Commandbutton described
above.
I know it's very hard to make this possible, otherwise I wouldn't have
bothered you with this, But I hope you'll help me!!!
A lot of Thanks In Advance.
R.Stift
---
Message posted from http://www.ExcelForum.com/