I have two workbooks "Checkbook.xlsm" and "TaxReporter.xlsm". The Checkbook has all cells locked and uses VBA forms to accept input, verify information and insert rows. There are twelve monthly spreadsheets labeled "January" through "December" with named ranges named "Payroll_Jan" though "Payroll_Dec". The following code fails is the checkbook is locked but works if it is not locked.
VBA from TaxReporter.xlsm
In my VBA code in TaxReporter.xlsm I would like to unlock the Ccheckbook.xlsm extract the needed data and then re-lock the Checkbook.xlsm.
Does anyone have an idea how I can do this?
I am new to the forum and searched but did not find an answer. This is my first post so I apologize for any rules I might have broken.
VBA from TaxReporter.xlsm
Code:
goSourceWorkbook.Activate
goSourceWorkbook.Sheets(gsWorkbookSheetName).Select
ActiveCell.SpecialCells(xlLastCell).Select
lOldLastRow = ActiveCell.Row
sOldRange = "C6:C" + CStr(lOldLastRow)
goSourceWorkbook.Sheets(gsWorkbookSheetName).Range(sOldRange).Activate
In my VBA code in TaxReporter.xlsm I would like to unlock the Ccheckbook.xlsm extract the needed data and then re-lock the Checkbook.xlsm.
Does anyone have an idea how I can do this?
I am new to the forum and searched but did not find an answer. This is my first post so I apologize for any rules I might have broken.