ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   problem calculate (https://www.excelbanter.com/excel-programming/338446-problem-calculate.html)

Jean-Pierre

problem calculate
 
Hi,

I have a problem with calculating.

i have:
- worksheet1 with
- vba code calculating certain cells in a selection_change section sub.
- userform 1 in which the user can input date that is then transferred tot
sheet1

The problem is that, in sheet1,all fields are calculated when i go from 1
textbox to another on the userform excpt the cells that are calculated in
the selection_change sub of sheet1 because there is no selection_change in
sheet one.

How can I have the code in the sub selection_change executed when i move
from one textbox to another on the userform ?

Thanks !!!!
Jean-Pierre



Tom Ogilvy

problem calculate
 
Use the Exit events of the Textboxes to run the code to recalculate.

SelectionChange only pertains to the worksheet.

--
Regards,
Tom Ogilvy



"Jean-Pierre" wrote in message
...
Hi,

I have a problem with calculating.

i have:
- worksheet1 with
- vba code calculating certain cells in a selection_change section

sub.
- userform 1 in which the user can input date that is then transferred tot
sheet1

The problem is that, in sheet1,all fields are calculated when i go from 1
textbox to another on the userform excpt the cells that are calculated in
the selection_change sub of sheet1 because there is no selection_change in
sheet one.

How can I have the code in the sub selection_change executed when i move
from one textbox to another on the userform ?

Thanks !!!!
Jean-Pierre





Jean-Pierre Damme

problem calculate
 
Hi,

Thanks for your input but now i have to make a code for every textbox
item in the userform. I have some 30 textboxes that the user can fill
out.

Any suggestion on how to make a code that is executed every time one of
the textboxes is changed by the user?

Thanks,
Pierre



*** Sent via Developersdex http://www.developersdex.com ***


All times are GMT +1. The time now is 04:55 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com