Link to home
Start Free TrialLog in
Avatar of Sara Hedtler
Sara Hedtler

asked on

TOTALS FROM WORKSHEET COLUMN TO TEXTBOX

I've been trying to get the total from a column to a textbox, but I can't get the form to open when use the same code from my other worksheet.  schedules.xlsm
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

What totls doe you want to get?

It could be

Private Sub UserForm_Initialize()
    Set oWs = Sheet2
    Set rData = oWs.Range("A1").CurrentRegion
 
    Me.txtTotalArea.Value = Application.WorksheetFunction.Sum(rData.Columns(8))
    
End Sub

Open in new window


Your numbers in the list are formatted as General and should be formatted as a Number
Avatar of Sara Hedtler
Sara Hedtler

ASKER

Thank you Roy.  I'm trying to get a running total to the txtTotalInsuranceToValue.  Just like in sheet1.
You need to format the column as a Number Format from the Format Cells Dialog, then the total works
schedules.xlsm
Thank you Roy, but it's pulling the totals from sheet1, I need sheet2 to total from column "N".
ASKER CERTIFIED SOLUTION
Avatar of Roy Cox
Roy Cox
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Once again, you saved the day, THANK YOU!
Pleased to help
The absolute best!