![]() |
userform Max value in Column A
I am setting up a userform with numerous textboxes.
I want to set 1 of the textboxes to always display the MAX value in Column A in a particular sheet within the workbook. How would i code this? I want it to be in the Userform Activate event. I have tried something like: Private Sub UserForm_Activate() TextBox4.Value = Sheets("Data Sheet for Inspections").MAX(0, x).Value End Sub But it no working.... Any idea's Corey.... |
userform Max value in Column A
Hi,
In any cell create the Max function formula then set the text value using the value of the cell with Max() in it. -- Rod Gill "Corey" wrote in message ... I am setting up a userform with numerous textboxes. I want to set 1 of the textboxes to always display the MAX value in Column A in a particular sheet within the workbook. How would i code this? I want it to be in the Userform Activate event. I have tried something like: Private Sub UserForm_Activate() TextBox4.Value = Sheets("Data Sheet for Inspections").MAX(0, x).Value End Sub But it no working.... Any idea's Corey.... |
userform Max value in Column A
Private Sub UserForm_Activate()
TextBox4.Value _ = application.max(Sheets("Data Sheet for Inspections").range("a:A")) End Sub Corey wrote: I am setting up a userform with numerous textboxes. I want to set 1 of the textboxes to always display the MAX value in Column A in a particular sheet within the workbook. How would i code this? I want it to be in the Userform Activate event. I have tried something like: Private Sub UserForm_Activate() TextBox4.Value = Sheets("Data Sheet for Inspections").MAX(0, x).Value End Sub But it no working.... Any idea's Corey.... -- Dave Peterson |
userform Max value in Column A
Thank you Dave.
Perfect. Was so slow, yet so far from it. "Dave Peterson" wrote in message ... Private Sub UserForm_Activate() TextBox4.Value _ = application.max(Sheets("Data Sheet for Inspections").range("a:A")) End Sub Corey wrote: I am setting up a userform with numerous textboxes. I want to set 1 of the textboxes to always display the MAX value in Column A in a particular sheet within the workbook. How would i code this? I want it to be in the Userform Activate event. I have tried something like: Private Sub UserForm_Activate() TextBox4.Value = Sheets("Data Sheet for Inspections").MAX(0, x).Value End Sub But it no working.... Any idea's Corey.... -- Dave Peterson |
All times are GMT +1. The time now is 09:57 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com