Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 40
Default First blank cell

I have made a userform that return back values from a sheet, and is
textboxes to give new values to the same sheet.
My problem is to make the textbox3 (Last line) to choose the first blank
cell to the right each time i open the userform.

Any suggestions?
Thanks

Private Sub ComboBox1_Change()
Dim iCtr As Integer

ictl = ComboBox1.Value
UserForm1.Label1 = Sheet2.Range("B" & CStr(2 + ictl))
UserForm1.Label17 = Sheet2.Range("C" & CStr(2 + ictl))
UserForm1.Label4 = Sheet1.Range("B" & CStr(2 + ictl))
UserForm1.Label5 = Sheet1.Range("D" & CStr(2 + ictl))
UserForm1.Label6 = Sheet1.Range("E" & CStr(2 + ictl))
UserForm1.Label13 = Sheet1.Range("C" & CStr(2 + ictl))

TextBox1.Text = Sheet2.Range("C" & CStr(2 + ictl))
TextBox2.Text = Sheet2.Range("D" & CStr(2 + ictl))
TextBox3.Text = Sheet2.Range("E" & CStr(2 + ictl +
Cells(Columns.Count).End(xlToLeft)(2, 1)))


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default First blank cell

Something like

ictl = Activeworkbook.Worksheets("Sheet1").End(xlDown).Ro w + 1

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Axel" wrote in message
...
I have made a userform that return back values from a sheet, and is
textboxes to give new values to the same sheet.
My problem is to make the textbox3 (Last line) to choose the first blank
cell to the right each time i open the userform.

Any suggestions?
Thanks

Private Sub ComboBox1_Change()
Dim iCtr As Integer

ictl = ComboBox1.Value
UserForm1.Label1 = Sheet2.Range("B" & CStr(2 + ictl))
UserForm1.Label17 = Sheet2.Range("C" & CStr(2 + ictl))
UserForm1.Label4 = Sheet1.Range("B" & CStr(2 + ictl))
UserForm1.Label5 = Sheet1.Range("D" & CStr(2 + ictl))
UserForm1.Label6 = Sheet1.Range("E" & CStr(2 + ictl))
UserForm1.Label13 = Sheet1.Range("C" & CStr(2 + ictl))

TextBox1.Text = Sheet2.Range("C" & CStr(2 + ictl))
TextBox2.Text = Sheet2.Range("D" & CStr(2 + ictl))
TextBox3.Text = Sheet2.Range("E" & CStr(2 + ictl +
Cells(Columns.Count).End(xlToLeft)(2, 1)))


*** Sent via Developersdex http://www.developersdex.com ***



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
Average Formula to display blank cell if named range is blank Rachael F Excel Worksheet Functions 3 February 22nd 08 05:05 PM
Start Cell B1 then find first blank cell, insert subtotal, next non blank, then next blank, sutotal cells in between......... [email protected][_2_] Excel Programming 2 June 7th 07 09:27 PM
Need macro to check if cell is not blank & previous cell is blank, copy information from row above & paste JenIT Excel Programming 4 April 12th 07 08:56 PM
Copy to first Blank cell in Colum C Non blank cells still exist be Ulrik loves horses Excel Programming 2 October 8th 06 07:35 PM
COPY A CONCATENATE CELL TO BLANK CELL PUTTING IN THE NEXT BLANK C. QUEST41067 Excel Discussion (Misc queries) 1 January 15th 05 09:29 PM


All times are GMT +1. The time now is 03:51 PM.

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

About Us

"It's about Microsoft Excel"