LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 24
Default How to display =x/y result in a user form

I have tried to display the result of a percentage calculation in a text box
built into a custom user form. In the properties section for the text box I
use the ControlSource property to link the text box to the cell in my
spreadsheet that contains the calculation result I want displayed.

I use the same property to display both x and y in 2 other text boxes on the
user form and have no problems with that at all.

Unfortunately I find that the calculation display goes wrong. I don't get
any error messages and my macro doesn't trip over but for some reason the
calculation formula disappears on the sheet the userform is linked to. After
a few times of running my macro (not always the same number), I notice the
calculation result shown in the user form has stopped changing and when I
check in the source sheet I find that the calculation formula is no longer in
the cell, it has been replaced by a number (not a random number but the
number calculated the last time the formula worked properly).

I have stepped through my code one by one and the cell the calculation is in
is not referred to anywhere else in the code, and nowhere else in any cells
in the workbook either. The only item that uses that cell reference is the
ControlSource I use for the user form.

Can anyone suggest why this is happening?

Maybe the ControlSource property is not suitable for displaying calculation
results in userforms, if so, can anyone suggest a more appropriate way to do
it??
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
user form question: text box to display result BigPig Excel Discussion (Misc queries) 0 February 28th 06 12:33 AM
user form question: text box to display result BigPig Excel Worksheet Functions 0 February 25th 06 08:17 PM
Problem displaying a calculation result in a user form AndyRoo Excel Programming 2 November 24th 05 09:45 PM
Display history in user form James W.[_2_] Excel Programming 2 February 1st 05 09:55 PM
how do i display a value in a user form as a result of a selectio. ptoddx1 Excel Programming 3 January 29th 05 04:42 PM


All times are GMT +1. The time now is 09:34 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"