View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Chip Pearson[_2_] Chip Pearson[_2_] is offline
external usenet poster
 
Posts: 95
Default Inserting value at end of range

Todd,

Use something like

If Me.CheckBox1.Value = True Then
Range("A" & Rows.Count).End(xlUp)(2) = TextBox1.Value
End If


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


"Todd Huttenstine" wrote in
message ...
Ok thanx, one last question...

I also have 1 checkbox1. How do I get it to perform that
code if checkbox1 is checked? If checkbox1 is not
checked, dont do the code.

Thanx


-----Original Message-----
Try this

Range("A" & Rows.Count).End(xlUp)(2) = TextBox1.Value


--
Regards Ron de Bruin
(Win XP Pro SP-1 XL2002 SP-2)
www.rondebruin.nl



"Todd Huttenstine"

wrote in message news:030101c3b5f6$21ae7710
...
Hey guys

Lets say I have Range A1:A100 and a textbox(Textbox1).
Currently there are values in A1:A25. I need for for
TextBox1 value to be inserted in the next empty cell in
the range. The next empty cell in the range is A26, so
therefor this is where I would like Textbox1.value to be
inserted.

How would write this?

I usualy just do a count formula+1 in any cell and have
the vba code refer to that cell as the location for the
next value to be inserted, but this can clutter up my
worksheet with variables.

Thanx

Todd Huttenstine



.