![]() |
Using command button to return numerical value from worksheet
Hi, I am trying to use a command button on a user form which when depressed, will return the value of a specific cell in the last row of my worksheet and display that value in a text box on the user form. Is there a way to do this? Thank you, Brad -- Brad J. ------------------------------------------------------------------------ Brad J.'s Profile: http://www.excelforum.com/member.php...o&userid=21713 View this thread: http://www.excelforum.com/showthread...hreadid=554532 |
Using command button to return numerical value from worksheet
Private Sub CommandButton1_Click()
Dim iLastRow as long iLastRow = Cells(Rows.Count,"A").End(xlUp).Row TextBox1.Text = Cells(iLastRow,"H").Value End sub -- HTH Bob Phillips (replace somewhere in email address with gmail if mailing direct) "Brad J." wrote in message ... Hi, I am trying to use a command button on a user form which when depressed, will return the value of a specific cell in the last row of my worksheet and display that value in a text box on the user form. Is there a way to do this? Thank you, Brad -- Brad J. ------------------------------------------------------------------------ Brad J.'s Profile: http://www.excelforum.com/member.php...o&userid=21713 View this thread: http://www.excelforum.com/showthread...hreadid=554532 |
All times are GMT +1. The time now is 06:08 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com