Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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



  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 28
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When is a cell empty and how do I empty it. C Brandt Excel Discussion (Misc queries) 5 August 13th 07 05:37 PM
Leaving an empty cell empty GRL Excel Discussion (Misc queries) 4 April 22nd 06 05:47 PM
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
Empty cell and a the empty String JE McGimpsey Excel Programming 0 September 13th 04 04:12 PM
VBA to copy to empty cell directly below a cell when analogous cells in different column have same value as each other? Steven Rosenberg Excel Programming 0 August 5th 03 06:10 AM


All times are GMT +1. The time now is 05:20 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"