Hello, thanks in advance for any help! Im newish to VBA.
I am trying to fix a mistake that I made from a master workbook into multiple save as workbooks.
The formulas I wrote in the original master were incorrect from range (A36:E37)
I wrote a VBA in my personal book that attempts to unlock the sheet, clear the data, replace the data from an external sheet, protect the sheet, save, and close.
I am using thisworkbook, and activeworkbook but it refrences my personal workbook in that case, not the one I want to.
Example, Open workbook 1 (corrected master) and 2. Copy range data from 1 to 2, save 2, close 2, repeat with 3-100
' fixprimalrecipe Macro
'
'
Range("A36:E37").Select
ActiveSheet.Unprotect
Selection.ClearContents
Windows("PRIMAL ALCHEMY RECIPE COSTING CARD.xls").Activate
Range("A36:E37").Select
Selection.Copy
ActiveWorkbook.Activate
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWorkbook.Save
End Sub
Any help is again, much appreciated!
I am trying to fix a mistake that I made from a master workbook into multiple save as workbooks.
The formulas I wrote in the original master were incorrect from range (A36:E37)
I wrote a VBA in my personal book that attempts to unlock the sheet, clear the data, replace the data from an external sheet, protect the sheet, save, and close.
I am using thisworkbook, and activeworkbook but it refrences my personal workbook in that case, not the one I want to.
Example, Open workbook 1 (corrected master) and 2. Copy range data from 1 to 2, save 2, close 2, repeat with 3-100
' fixprimalrecipe Macro
'
'
Range("A36:E37").Select
ActiveSheet.Unprotect
Selection.ClearContents
Windows("PRIMAL ALCHEMY RECIPE COSTING CARD.xls").Activate
Range("A36:E37").Select
Selection.Copy
ActiveWorkbook.Activate
ActiveSheet.Paste
Application.CutCopyMode = False
ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
ActiveWorkbook.Save
End Sub
Any help is again, much appreciated!