Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all, Tom Ogilvy helped me extensively last night to get the above
working. I now have the problem that if i include the code within my routine it breaks the code and the routine stops. The code is below and after i have inserted this code in the code section of "sheet1" i need to carry on with my routine to protect and save the workbook. can anybody help me with this please ? Sub InsertProc() Dim sname As String Dim StartLine As Long sname = ActiveSheet.CodeName With ActiveWorkbook.VBProject.VBComponents(sname).CodeM odule StartLine = .CreateEventProc("Change", "Worksheet") + 1 .InsertLines StartLine, "Dim VRange As Range" .InsertLines StartLine + 1, "Set VRange = ActiveSheet.Columns(""H:H"")" .InsertLines StartLine + 2, "Target.Font.ColorIndex = 3" .InsertLines StartLine + 3, "Target.Font.Bold = True" End With End Sub Thank you in advance Les Stout *** Sent via Developersdex http://www.developersdex.com *** |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating an event procedure question | Excel Programming | |||
Event Procedure | Excel Programming | |||
Event Procedure again | Excel Programming | |||
Event Procedure Programming | Excel Programming | |||
OnTime event not firing in Workbook_Open event procedure | Excel Programming |