MonioDee
New Member
Hi Mentors! I hope someone could help I have created a template that could help me a lot in my work, but sadly I only have a very few knowledge in regards of VBA and all of those codes were just came from internet search, I need to paste the details in a identified sheets and I want them to still hidden so that the report can never be replace nor manipulated, minor or major reconstruction to my template would be a very big help, and very much appreciated. Thank so much in advance!! ^_^
Sub copyPasteData()
Dim strSourceSheet As String
Dim strDestinationSheet As String
Dim LastRow As Long
strSourceSheet = "Data entry"
Sheets(strSourceSheet).Visible = True
Sheets(strSourceSheet).Select
Range("c2").Select
Do While ActiveCell.Value <> ""
strDestinationSheet = ActiveCell.Value
ActiveCell.Offset(0, -2).Resize(1, ActiveCell.CurrentRegion.Columns.Count).Select
Selection.Copy
Sheets(strDestinationSheet).Visible = True
Sheets(strDestinationSheet).Select
LastRow = LastRowInOneColumn("A")
Cells(LastRow + 1, 1).Select
Selection.PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheets(strSourceSheet).Select
ActiveCell.Offset(0, 2).Select
ActiveCell.Offset(1, 0).Select
Loop
End Sub
Sub copyPasteData()
Dim strSourceSheet As String
Dim strDestinationSheet As String
Dim LastRow As Long
strSourceSheet = "Data entry"
Sheets(strSourceSheet).Visible = True
Sheets(strSourceSheet).Select
Range("c2").Select
Do While ActiveCell.Value <> ""
strDestinationSheet = ActiveCell.Value
ActiveCell.Offset(0, -2).Resize(1, ActiveCell.CurrentRegion.Columns.Count).Select
Selection.Copy
Sheets(strDestinationSheet).Visible = True
Sheets(strDestinationSheet).Select
LastRow = LastRowInOneColumn("A")
Cells(LastRow + 1, 1).Select
Selection.PasteSpecial xlPasteValues
Application.CutCopyMode = False
Sheets(strSourceSheet).Select
ActiveCell.Offset(0, 2).Select
ActiveCell.Offset(1, 0).Select
Loop
End Sub