I need VBA code to substract 2 numbers in my excel sheet and display the results in a message box. I will acitvate this through the use of a command button. Can anyone help with proper code to achieve this.
Well I know you can display the result of a cell in a text box... you can click the outside border of a textbox and the go to the edit bar and enter something like: =F1
Then the Value is entered in your text box. Maybe you can have the formula hidden on your sheet somewhere.
I tried this and apparently i am doing something wrong. I placed in a module for that sheet and attached it to a commande button. When i run I get a run-time error '13' Type mismatch. Any ideas on how to correct?
Greatly apprecitate your help!