View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Norman Jones Norman Jones is offline
external usenet poster
 
Posts: 5,302
Default looking for the empty cell

Hi Dok112,

Try something like:

Dim SH As Worksheet
Dim LCellA As Range
Dim LCellB As Range

Set SH = ActiveSheet '<<==== CHANGE

Set LCellA = SH.Cells(Rows.Count, "A").End(xlUp)(2)
Set LCellB = SH.Cells(Rows.Count, "B").End(xlUp)(2)


LCellA.Value = Textbox1.Value
LCellB.Value = Textbox2.Value


---
Regards,
Norman


"dok112" wrote in
message ...

Hello all,

I can't figure out how to make this work. I was thinking about doing a
loop, but it just doesnt seem to work correctly. What I have, is a
userform, and the information needs to be added to the next available
open cell in a corresponding column. I have the relationships down
below.

Column A goes to tg1.textbox1.value
Column B goes to tg1.textbox2.value
etc.

Can anyone help me out? I greatly appreciate it!! :)


--
dok112
------------------------------------------------------------------------
dok112's Profile:
http://www.excelforum.com/member.php...o&userid=10581
View this thread: http://www.excelforum.com/showthread...hreadid=493953