Excelnoub
Member
I have some code running in my main Workbook. In my last sheet, called "Archives" is information that is dead, meaning, its information that will not be used but necessary.
I would love to modify my transfer vb code that I have right now to open a new workbook that I have created called “Archives” and transfer my information to this workbook instead.
Example:
Main workbook sheet 5 Called “Reports”. In this sheet I have to following code:
‘If Not Intersect(Target, Range("X:X")) Is Nothing And Target.Cells.Count = 1 Then
Application.EnableEvents = False
If LCase(Trim(Target.Value)) = "yes" Then
Msg = MsgBox("Contract completed. Send it to Archives?", vbYesNo + vbQuestion + vbSystemModal, "Excel Report")
If Msg = vbYes Then
With Range("A" & Target.Row)
Sheets("Archives").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Resize(, 18).Value = .Resize(, 18).Value
.Resize(, 24).ClearContents
End With
Else
Cells(TRow, TCol) = ""
End If
End If’
Now instead of sending it to the same workbook I need to scrap Sheet “Archives” to minimize the quantity of information within this workbook. So I figured, if I have a new workbook called “Archives” in my C: Document, then when I select “yes” from the above code, it will first open the new “Archives” workbook, then transfer the information in the next new available row, then close the “Archives” workbook.
Is this possible and could anyone help me with this?
I would love to modify my transfer vb code that I have right now to open a new workbook that I have created called “Archives” and transfer my information to this workbook instead.
Example:
Main workbook sheet 5 Called “Reports”. In this sheet I have to following code:
‘If Not Intersect(Target, Range("X:X")) Is Nothing And Target.Cells.Count = 1 Then
Application.EnableEvents = False
If LCase(Trim(Target.Value)) = "yes" Then
Msg = MsgBox("Contract completed. Send it to Archives?", vbYesNo + vbQuestion + vbSystemModal, "Excel Report")
If Msg = vbYes Then
With Range("A" & Target.Row)
Sheets("Archives").Cells(Rows.Count, "A").End(xlUp).Offset(1, 0).Resize(, 18).Value = .Resize(, 18).Value
.Resize(, 24).ClearContents
End With
Else
Cells(TRow, TCol) = ""
End If
End If’
Now instead of sending it to the same workbook I need to scrap Sheet “Archives” to minimize the quantity of information within this workbook. So I figured, if I have a new workbook called “Archives” in my C: Document, then when I select “yes” from the above code, it will first open the new “Archives” workbook, then transfer the information in the next new available row, then close the “Archives” workbook.
Is this possible and could anyone help me with this?