I'm nearly finished a workbook and I'm having issues with the macro.
The workbook's main function is to allow our general staff to enter information into an input sheet and then have that information populate our worklog table. The table and the workbook are protected outside of a few cells that the staff can use to fill in their information. There is no password on these locks and no need to worry about any password showing up in the VBA code if I choose to add one.
The information from the "Input" worksheet is brought into "Table1" on a different worksheet labeled "Table".
My current Macro works but only when the table worksheet isn't protected. Which poses a large issue because this information is not allowed to be altered.
It looks like this.
It unprotects the input sheet
selects the information
populates the table with the information and then adds a new line
returns to the input worksheet
clears the information
then protects it again.
I've tried getting it to unprotect the table worksheet but it just halts everything. So I removed that line of code while I finish the rest of the workbook. I'm really struggling with this one.
Thanks in advance.
The table is labeled "Table1"
and is located on a tab labeled "Table"
The workbook's main function is to allow our general staff to enter information into an input sheet and then have that information populate our worklog table. The table and the workbook are protected outside of a few cells that the staff can use to fill in their information. There is no password on these locks and no need to worry about any password showing up in the VBA code if I choose to add one.
The information from the "Input" worksheet is brought into "Table1" on a different worksheet labeled "Table".
My current Macro works but only when the table worksheet isn't protected. Which poses a large issue because this information is not allowed to be altered.
It looks like this.
Code:
Sub Population()
'
' Population Macro
' Populates worklog input information into table1 on the table tab.
Sheet1.Unprotect
Range("B3:B11").Select
Selection.Copy
Sheets("Table").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=True
Rows("2:2").Select
Application.CutCopyMode = False
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
Range("A2").Select
Sheets("Input Worksheet").Select
Selection.ClearContents
Range("B3").Select
Sheet1.Protect
End Sub
selects the information
populates the table with the information and then adds a new line
returns to the input worksheet
clears the information
then protects it again.
I've tried getting it to unprotect the table worksheet but it just halts everything. So I removed that line of code while I finish the rest of the workbook. I'm really struggling with this one.
Thanks in advance.
The table is labeled "Table1"
and is located on a tab labeled "Table"