Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming,microsoft.public.scripting.vbscript
|
|||
|
|||
![]()
Hi,
I've been over and over it, and I can't find anything wrong. But it doesn't work. It crashes Excel every time. I got it from a smart guy named Chip Pearson (thank you Chip). To be specific, I added the variables inside the named "String" arguments, but it didn't work before I did that either. It *almost* works, then crashes... ' Insert SelectionChange event procedure With ActiveWorkbook.VBProject.VBComponents(ActiveWorkbo ok.Worksheets("Contents"). CodeName).CodeModule .InsertLines Line:=.CreateEventProc("SelectionChange","Workshee t") + 1, _ String:="If Not Intersect(Target, Range(""" & nextCell & """)) Is Nothing Then" & VbCrLF & _ " Charts(""" & chartName & """).Activate" & VbCrLF & _ "End If" End With Any ideas? Thank you, Robert Stober |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is wrong with this code? | Excel Discussion (Misc queries) | |||
What is wrong with this code? | Excel Discussion (Misc queries) | |||
What is wrong with the code? | Excel Discussion (Misc queries) | |||
Can someone tell me what is wrong with this code? | Excel Discussion (Misc queries) | |||
Is something wrong with the code | Excel Programming |