View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JLGWhiz JLGWhiz is offline
external usenet poster
 
Posts: 3,986
Default Userforms & worksheets

This could probably be made to look neater, but
it should work.

lastRow =Worksheets("CD").Cells(Rows.Count, 1) _
..End(xlUp).Row
Sheets("CD").Range("A" & lastRow + 1) = _
Sheets("CD").Range("A" & lastRow).Value + 1
UserForm1.TextBox22.Value = Worksheets("CD") _
..Range("A" & lastRow + 1).Value

"Jock" wrote:

In a textbox on a userform I want to display the next available number from
the worksheet "CD" - column A.
Column A is sequentially numbered so essentially it would be LastRow + 1
I can get the date and time and usernames in other text boxes on the user
form (i.e. UserForm1.TextBox21.Value = UserName()) but I am having trouble
with this number

Any ideas?
--
Traa Dy Liooar

Jock