Thread: Frames on Form
View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
Ueli Werner Ueli Werner is offline
external usenet poster
 
Posts: 7
Default Frames on Form

Hi Peter

Is it necesarry to write this way to cell (Range... = s)? I have a
ControlSource on the textboxes. Isn't it possible to manually tell the
textbox to update to the cell?

Regards

Ueli
"Peter T" <peter_t@discussions schrieb im Newsbeitrag
...
In a new form put two textboxes in a frame, also put another control (say
a button)somewhere on the form but not in the frame.

Private Sub Frame1_Exit(ByVal Cancel As MSForms.ReturnBoolean)
Dim s As String
s = Me.TextBox1.Text
If Len(s) Then Range("A1") = s
s = Me.TextBox2.Text
If Len(s) Then Range("A2") = s
End Sub

type some text into both textboxes and click then click the button (to
exit the frame)

Regards,
Peter T


"Ueli Werner" wrote in message
...
Maybe

But how can I force the textbox to write down to the cell?

Thanks alot

Ueli
"Peter T" <peter_t@discussions schrieb im Newsbeitrag
...
Frames have Enter/Exit events, sounds like the Exit event will help you

Regards,
Peter T

"Ueli Werner" wrote in message
...
Hi newsgroup

I have a form and I am working with frames on my form.

When I change from one frame to the other on my form, data will not be
written on excel cell. The value of the textbox also turn back to the
original value (I think that's because the value is not written to the
cell).

So. I have to use frames and I did some test on handling event of the
frames but this seems to complicated.

Isn't there a possibility to upate field after the frame_exit event or
are there any other solutions?

Thanks for every help.

Ueli