AWM21
New Member
- Joined
- Aug 2, 2021
- Messages
- 13
- Office Version
- 365
- Platform
- Windows
Hello, I'm having an issue and I can't find a simple solution.
I have (2) UserForms that each fill tables in two separate sheets. Problem is, I want to run the forms from a Dashboard and the forms only fills cells on the sheet I'm active on.
I need UF1 to fill sheet2 and UF2 to fill sheet3 all while I'm viewing/active on the Dashboard Sheet1. Overall, I need to know what code to use to force UserForm entries to fill a specific table, regardless of what sheet the user is active on.
Thanks for your help. ?
Here is my current UF code.
UserForm1:
UserForm2:
I have (2) UserForms that each fill tables in two separate sheets. Problem is, I want to run the forms from a Dashboard and the forms only fills cells on the sheet I'm active on.
I need UF1 to fill sheet2 and UF2 to fill sheet3 all while I'm viewing/active on the Dashboard Sheet1. Overall, I need to know what code to use to force UserForm entries to fill a specific table, regardless of what sheet the user is active on.
Thanks for your help. ?
Here is my current UF code.
UserForm1:
VBA Code:
Private Sub submitBtn_Click()
erow = Sheet2.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 1) = Desc.Text
Cells(erow, 2) = Amount.Text
Cells(erow, 3) = Qty.Text
Clear_Form
End Sub
Private Sub UserForm_Click()
End Sub
Sub Clear_Form()
For Each ctrl In Me.Controls
Select Case TypeName(ctrl)
Case "TextBox"
ctrl.Text = ""
End Select
Next
End Sub
Private Sub UserForm_Initialize()
End Sub
UserForm2:
VBA Code:
Private Sub CommandButton1_Click()
erow = Sheet3.Cells(Rows.Count, 1).End(xlUp).Offset(1, 0).Row
Cells(erow, 1) = Desc.Value
Cells(erow, 2) = Freq_Month.Value
Cells(erow, 3) = Amount.Value
Clear_Form
End Sub
Sub Clear_Form()
For Each ctrl In Me.Controls
Select Case TypeName(ctrl)
Case "TextBox"
ctrl.Text = ""
End Select
Next
End Sub
Private Sub UserForm_Click()
End Sub
Private Sub UserForm_Initialize()
End Sub