From: Dave K on
I have created Userforms for timesheets with different projects appearing on
a Multi page Userform. The problem is I need to show the subtotals on another
Userform as the user inputs the data. i've tried everything but I can't get
it to work
From: Harald Staff on
Demo: Userform1 has a Textbox1. Userform2 has a Label1.

Standard module code:

Public Monitorform As UserForm2

Sub RunThis()
Dim UF1 As UserForm1
Set UF1 = New UserForm1
Set Monitorform = New UserForm2
Monitorform.StartUpPosition = 0
Monitorform.Show vbModeless
UF1.Show vbModeless
End Sub

Userform1 code:

Private Sub TextBox1_Change()
If Monitorform Is Nothing Then Exit Sub
Monitorform.Label1.Caption = TextBox1.Text
End Sub

Userform2 Code:

Private Sub UserForm_QueryClose(Cancel As Integer, CloseMode As Integer)
Set Monitorform = Nothing
End Sub


HTH. Best wishes Harald




"Dave K" <DaveK(a)discussions.microsoft.com> wrote in message
news:9D996BE3-3284-4838-A43B-C79037D0157A(a)microsoft.com...
>I have created Userforms for timesheets with different projects appearing
>on
> a Multi page Userform. The problem is I need to show the subtotals on
> another
> Userform as the user inputs the data. i've tried everything but I can't
> get
> it to work