Hello Excel Friends,<br>
<br>
I have a user form that currently publishes the data to a database sheet in one row, however, what I need it to do is publish the data vertically instead of horizontally, but I need 2 of the form sources to be replicated in each row.<br>
<br>
My current user form control has one array. Code below;<br>
<br>
<br>
<br>
I then have the below code that calls the form controls;<br>
<br>
<br>
<br>
<br>
I am trying to work out how to get the data to publish in separate rows but with the data and combobox1 fields in every row.<br>
<br>
So I will end up with 5 headers;<br>
<br>
Date Name Task Quantity completed Oldest date worked<br>
<br>
I think I want something like this;<br>
<br>
<br>
<br>
<br>
I am not really sure if I need to do this to the form controls or if I need to amend the code that calls the form controls and get that to do something different.<br>
<br>
Any help is greatly appreciated. This is the final piece to my jigsaw.....<br>
<br><br type="_moz">
<br>
I have a user form that currently publishes the data to a database sheet in one row, however, what I need it to do is publish the data vertically instead of horizontally, but I need 2 of the form sources to be replicated in each row.<br>
<br>
My current user form control has one array. Code below;<br>
<br>
Code:
Function FormControls() As Variant<br>
FormControls = Array("DateTextBox", "ComboBox1", "Refunds", "Refunds_Date", "WriteOffs", "WriteOffs_Date", "Cancellations", _<br>
"Cancellations_Date", "Modifications", "Modifications_Date", "Indemnities", "Indemnities_Date", "Clearances", "Clearances_Date", _<br>
"PartialPaymentsNew", "PartialPaymentsNew_Date", "PartialPaymentsIp", "PartialPaymentsIp_Date", "RightOfWithdrawalSpread", _<br>
"RightOfWithdrawalSpread_Date", "RightOfWithdrawalCRM", "RightOfWithdrawalCRM_Date", "RefundExceptions", "RefundExceptions_Date", _<br>
"PSOreport", "PSOreport_Date", "CSD", "CSD_Date", "RefundFixes", "RefundFixes_Date", "RefundsCRM", "RefundsCRM_Date", "BankReport", _<br>
"BankReport_Date", "DeletionReport", "DeletionReport_Date")<br>
<br>
End Function
<br>
I then have the below code that calls the form controls;<br>
<br>
<br>
Code:
'references Form Controls macro with tasks detailed<br>
ReDim data(1 To UBound(FormControls))<br>
'build array<br>
For i = 1 To UBound(FormControls)<br>
With Form.Controls(FormControls(i))
<br>
I am trying to work out how to get the data to publish in separate rows but with the data and combobox1 fields in every row.<br>
<br>
So I will end up with 5 headers;<br>
<br>
Date Name Task Quantity completed Oldest date worked<br>
<br>
I think I want something like this;<br>
<br>
<br>
Code:
Function FormControls() As Variant<br>
FormControls = Array 1("DateTextBox", "ComboBox1", "Refunds", "Refunds_Date")<br>
Array 2("DateTextBox", "ComboBox1", "WriteOffs", "WriteOffs_Date")<br>
Array 3("DateTextBox", "ComboBox1", "Cancellations", "Cancellations_Date")<br>
Array 4("DateTextBox", "ComboBox1", "Modifications", "Modifications_Date")<br>
Array 5("DateTextBox", "ComboBox1", "Indemnities", "Indemnities_Date")<br>
Array 6("DateTextBox", "ComboBox1", "Clearances", "Clearances_Date")<br>
Array 7("DateTextBox", "ComboBox1", "PartialPaymentsNew", "PartialPaymentsNew_Date")<br>
Array8("DateTextBox", "ComboBox1", "PartialPaymentsIp", "PartialPaymentsIp_Date")<br>
Array 9("DateTextBox", "ComboBox1", "RightOfWithdrawalSpread", "RightOfWithdrawalSpread_Date")<br>
Array10("DateTextBox", "ComboBox1", "RightOfWithdrawalCRM", "RightOfWithdrawalCRM_Date")<br>
Array11("DateTextBox", "ComboBox1", "RefundExceptions", "RefundExceptions_Date")<br>
Array12("DateTextBox", "ComboBox1", "PSOreport", "PSOreport_Date")<br>
Array13("DateTextBox", "ComboBox1", "CSD", "CSD_Date")<br>
Array14("DateTextBox", "ComboBox1", "RefundFixes", "RefundFixes_Date")<br>
Array15("DateTextBox", "ComboBox1", "RefundsCRM", "RefundsCRM_Date")<br>
Array16("DateTextBox", "ComboBox1", "BankReport", "BankReport_Date")<br>
Array17("DateTextBox", "ComboBox1", "DeletionReport", "DeletionReport_Date")<br>
<br>
End Function
<br>
I am not really sure if I need to do this to the form controls or if I need to amend the code that calls the form controls and get that to do something different.<br>
<br>
Any help is greatly appreciated. This is the final piece to my jigsaw.....<br>
<br><br type="_moz">