View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
Richard Buttrey Richard Buttrey is offline
external usenet poster
 
Posts: 296
Default checking input on a textbox in userform to be a %

On Fri, 19 Aug 2005 14:31:00 GMT, "Jean-Pierre D via OfficeKB.com"
wrote:

Hi richard,

No, that is not what i mean.

In sheet 1, i have a cell that is filled throug the userform (a multipage).
That works fine now.
However in the vba code for sheet 1, i have a few codes that calculate other
cells in sheet one, depending on the user driven cell. Those fields do not
update when i change something in my userform.
The problem here is that the VBA code for sheet one is only executed when a
SelectionChange takes place.
This does not take place because everything is doen in the userform and the
user will not see sheet1.
any suggestions?


Thanks,
JP



I've tried to mimic what I think you mean. I have a Sheet1 in which A1
is the cell linked via the ControlSource property to the Textbox.

I have the Userform showing on Sheet2 and with the code modified as
below to include a reference to Sheet1

Private Sub UserForm_Terminate()
If Worksheets("Sheet1").Range("a1") 1 Then
Worksheets("Sheet1").Range("a1") = Worksheets("Sheet1").Range("a1") /
100
End Sub

This works for me, and changes A1 and all dependent cells on Sheet1 as
I'd expect.

Am I missing something....???

Rgds


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________