Report

Userform to export data to another sheet [Solved]

Ask a question redbaby 11Posts Monday March 21, 2016Registration date March 24, 2016 Last seen - Last answered on Mar 24, 2016 08:53AM
Hello everybody,

Please could anyone spare his/her scares time to help me, I'm new in this forum and I hope to be an expert in excel. Your contributions would be highly appreciated, thank you.

I have a userform named MembersInformationEntry; it as the following details:

Label1 named 'member Name' with a corresponding textbox4 (MembersData B2)

Label2 named 'Monthly Savings' with a corresponding textbox1 (MembersData E2)

Label3 named 'Application fee' with a corresponding textbox2 (MembersData G2)

Label4 named 'Date Joined' with a corresponding textbox3 (MembersData C2)

Option Botton1 for 'Cleared' and Option Botton2 for 'Not Cleared' (MembersData H2)

Command Botton1 for 'OK'(this is to transfer new member info to a sheet named "membersdata" in the next available emty row as indicated above) and Command Botton2
See more 
Helpful
+0
moins plus
Hi Redbaby,

Since you are eager to learn, check out this link:
http://www.excel-easy.com/vba/userform.html

The thing you might miss is to put data in the first available row:
Range("A"&rows.count).end(xlup).offset(1,0)

Good luck, have fun and best regards,
Trowa
redbaby 11Posts Monday March 21, 2016Registration date March 24, 2016 Last seen - Mar 23, 2016 03:03AM
Thanks a lot, I enjoy having you in this forum.
Reply
Add comment
Helpful
+0
moins plus
Thanks for the hint,

Please I have manage to write the code hereuder from the example you gave me but when I ran it, it is showing Run-time error '424' Object required. Where do I go from here, I'm lost.

Secondly, I like the to have a command button on a sheet named 'Home' that if I click the form will show and then fill data and then transfer to sheet named 'MembersData'

Private Sub ClearCommandButton_Click()

Call UserForm_Initialize

End Sub

Private Sub OkCommandButton_Click()

Dim emptyRow As Long

'Make Sheet1 active
Sheet1.Activate

'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("B:B")) + 1

'Transfer information
Cells(emptyRow, 2).Value = NameTextBox.Value
Cells(emptyRow, 3).Value = DateTextBox.Value
Cells(emptyRow, 5).Value = SivingsTextBox.Value
Cells(emptyRow, 7).Value = AppFeeTextBox.Value
Cells(emptyRow, 8).Value = ClearedCheckBox1.Value
Cells(emptyRow, 8).Value = NotClearedCheckBox.Value

End Sub

Private Sub UserForm_Initialize()

'Empty NameTextBox
NameTextBox.Value = ""
SavingsTextBob.Value = ""
AppFeeTextBox.Value = ""
DateTextBox.Value = ""

'Uncheck DataCheckBoxes
ClearedCheckBox1.Value = False
NotClearedCheckBox.Value = False

End Sub
Add comment
Helpful
+0
moins plus
Hello Everybody,

Let me start by appreciating all members of this forum for your support especially TrowaD.

I have been manage to put this codes together and it working well, I had to replace the check box with the combo box.

Option Explicit


Private Sub CancelCommandButton_Click()
Unload Me
End Sub

Private Sub ClearCommandButton_Click()

Call UserForm_Initialize

End Sub

Private Sub OkCommandButton_Click()

Dim emptyRow As Long

'Make Sheets active
Sheets("MembersData").Activate

'Determine emptyRow
emptyRow = WorksheetFunction.CountA(Range("B:B")) + 1

'Transfer information
Cells(emptyRow, 2).Value = NameTextBox.Value
Cells(emptyRow, 3).Value = DateTextBox.Value
Cells(emptyRow, 5).Value = SavingsTextBox.Value
Cells(emptyRow, 7).Value = AppFeeTextBox.Value
Cells(emptyRow, 8).Value = StatusComboBox.Value

End Sub

Private Sub UserForm_Initialize()

'Empty NameTextBox
NameTextBox.Value = ""
SavingsTextBox.Value = ""
AppFeeTextBox.Value = ""
DateTextBox.Value = ""

'Empty StatusComboBox
StatusComboBox.Clear

'Fill StatusComboBox
With StatusComboBox
.AddItem "Cleared"
.AddItem "Not Cleared"
.AddItem "Pending"
End With

End Sub
Add comment

Member requests are more likely to be responded to.

Members can monitor the statuses of their requests from their account pages.

A CCM membership gives you access to additional options.

Not a member yet?

Sign up now. It takes less than a minute and is completely free!