I have, what I think is a fairly simple question:
I have created a userform with 6 textboxes and one combobox. At the moment everything works perfectly, however, I would like to change the location the data is saved to.
At the moment, the data is saved to the first available cell in the upper right hand corner of the spreadsheet. However, I would like to save the data to a specific location on a different hidden worksheet. The purpose of this is to prevent access to the data table by the end user.
Hopefully, someone has an easy answer to this question. I have included the relevant code below
Private Sub CommandButton1_Click() Dim A As Long A = Cells(Rows.Count, 1).End(xlUp).Row + 1 Cells(A, 1).Value = FNameva.Value Cells(A, 2).Value = LNameva.Value Cells(A, 3).Value = Cellva.Value Cells(A, 4).Value = emailva.Value Cells(A, 5).Value = Streetva.Value Cells(A, 6).Value = Cityva.Value Cells(A, 7).Value = Stateva.Value Cells(A, 8).Value = Zipva.Value Cells(A, 9).Value = Rolecmb.Value FNameva.Value = "" LNameva.Value = "" Cellva.Value = "" emailva.Value = "" Streetva.Value = "" Cityva.Value = "" Stateva.Value = "" Zipva.Value = "" Rolecmb.Value = "" End Sub