In my worksheet, I have a cell containing the following formula:

=SUBTOTAL(3,A:A)-1

This counts the number of rows that I have displayed, with the exception of the first two rows (which, contain frozen headers, so they don't need to be counted). So, when I apply a filter to my data, this number changes accordingly to tell me how many rows I have displayed.

I also have a UserForm that contains a lot of buttons, which do a bunch of sorting operations on my data. I want to add a textbox to this UserForm that will display the number of rows that are displayed after each sorting operation.

I am able to link ActiveX textboxes to the cell that contains my formula, and it works perfectly. However, I don't think you can use ActiveX textboxes in a Userform; just Form Controls.

I tried using a Form Control textbox in my UserForm, then linked the TextBox's Properties, I set the ControlSource to the cell containing my formula. This works for one sorting operation. Then, the cell containing my formula gets overwritten with the value to which the formula evaluated on the first sort operation. The formula gets deleted, and thus the number ceases to change with subsequent filters.

How can I link a Form Control TextBox to a Formula-Based cell in my worksheet so that the formula continues to update as I apply filters to my data? Thanks,