janullrich18
New Member
- Joined
- Sep 26, 2013
- Messages
- 2
Hey Guys,
My problem:
I have a userform launched on the workbook open event for the user to input the names and tech data for a range of fans. For example, they enter 5 fans. Once they enter the data into the form and click start, 5 sheets named,for example Fan1, Fan2.... to Fan5 are dynamically created and the user form closes. The start button click sub on the form also involves a part to write code to each worksheet module for a worksheet change event. Everything works fine when the VBproject is not locked, as soon as I lock it and go through the exact same process, I get an error on the
Any ideas on why this happens?
Cheers
My problem:
I have a userform launched on the workbook open event for the user to input the names and tech data for a range of fans. For example, they enter 5 fans. Once they enter the data into the form and click start, 5 sheets named,for example Fan1, Fan2.... to Fan5 are dynamically created and the user form closes. The start button click sub on the form also involves a part to write code to each worksheet module for a worksheet change event. Everything works fine when the VBproject is not locked, as soon as I lock it and go through the exact same process, I get an error on the
Code:
ThisWorkbook.VBProject.VBComponents("Sheet" & IntSheetCount).CodeModule.AddFromString StrWorksheetChangeCode
Any ideas on why this happens?
Cheers