Re: Is this possible?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



Okay-

Disregard the post above...The code below works fine. However...

The only thing I'm stuck on now is figuring how to add an additional row in
my code to do exactly the same thing row C does. So, row D!

Also, since combobox1 (CB) is a range using the RowSource property, and CB2
and CB3 will be additems, how would I trigger those to drop into the cells
with the commandclick?



Private Sub CommandButton2_Click()
rowno = Columns(1).Find(Trim(TextBox2.Value)).Row
Range("IV" & rowno).Select
Selection.End(xlToLeft).Select
colno = ActiveCell.Column
Cells(rowno, colno + 1).Value = TextBox1.Value
End Sub




Toppers wrote:
>Chris,
> You need to be more specific i.e. what textboxes put data
>where. If the cells contain formulae, then I presume the textbox value is
>required to be subsituted into the formulae so you would need something like:
>
>Private Sub CommandButton2_Click()
>
>rowno = Columns(1).Find(Trim(TextBox2.Value)).Row
>
>Range("b" & rowno) = "=Sqrt(Int(" & TextBox1.Value & "))" ' <== sample
>formula
>Range("c" & rowno="= ..... your formula"
>etc
>
>End Sub
>
>HTH
>
>> I appreciate the response. Tha is pretty much what I'm looking for, however,
>> I need the data from the userform to drop into colukmns A,B,C everytime.
>[quoted text clipped - 15 lines]
>> >Cells(rowno, colno + 1).Value = TextBox1.Value
>> >End Sub

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.aspx/excel-programming/200601/1
.


Quantcast