Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
looking for the empty cell
You can try this.
Private Sub TextBox1_Change() If TextBox1 < "" Then Dim colA As Double colA = Cells(Rows.Count, "A").End(xlUp).Row + 1 ActiveSheet.Range("A" & colA).Value = TextBox1.Value TextBox1 = "" End If End Sub Regards Yngve |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
looking for the empty cell
Hello all, I can't figure out how to make this work. I was thinking about doing loop, but it just doesnt seem to work correctly. What I have, is userform, and the information needs to be added to the next availabl open cell in a corresponding column. I have the relationships dow 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!! : -- dok11 ----------------------------------------------------------------------- dok112's Profile: http://www.excelforum.com/member.php...fo&userid=1058 View this thread: http://www.excelforum.com/showthread.php?threadid=49395 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
When is a cell empty and how do I empty it. | Excel Discussion (Misc queries) | |||
Leaving an empty cell empty | Excel Discussion (Misc queries) | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
Empty cell and a the empty String | Excel Programming | |||
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? | Excel Programming |