Dear All,
I've got a spreadsheet that contains a userform. My userform works and does everything I want it to do. I copy the data entered from the user into the sheet I want. I'd like to duplicate that data into a different workbook too.
So, containing the userform in only 1 file, I'd like to copy the data in 2 different files.
I've got this bit of code:
If CGHI Then
Cells(NextRow, 7) = "a"
Set ws2 = Workbooks("HI.xls").Sheets("Airframe")
'Determine next empty row
iRow = _
Application.WorksheetFunction.CountA(Range("A:A")) + 1
'Transfer Data
ws2.Cells(iRow, 1) = PubliType.Value
ws2.Cells(iRow, 2) = PubliNum.Text
ws2.Cells(iRow, 3) = RevNum.Text
ws2.Cells(iRow, 4) = PubliTitle.Text
ws2.Cells(iRow, 5) = ComplianceType.Value
ws2.Cells(iRow, 6) = DateBox.Text
End If
I have defined ws2 as: Dim ws2 As Worksheet
Can anyone help me???
Thanks!!!!
I've got a spreadsheet that contains a userform. My userform works and does everything I want it to do. I copy the data entered from the user into the sheet I want. I'd like to duplicate that data into a different workbook too.
So, containing the userform in only 1 file, I'd like to copy the data in 2 different files.
I've got this bit of code:
If CGHI Then
Cells(NextRow, 7) = "a"
Set ws2 = Workbooks("HI.xls").Sheets("Airframe")
'Determine next empty row
iRow = _
Application.WorksheetFunction.CountA(Range("A:A")) + 1
'Transfer Data
ws2.Cells(iRow, 1) = PubliType.Value
ws2.Cells(iRow, 2) = PubliNum.Text
ws2.Cells(iRow, 3) = RevNum.Text
ws2.Cells(iRow, 4) = PubliTitle.Text
ws2.Cells(iRow, 5) = ComplianceType.Value
ws2.Cells(iRow, 6) = DateBox.Text
End If
I have defined ws2 as: Dim ws2 As Worksheet
Can anyone help me???
Thanks!!!!