View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Alex T Alex T is offline
external usenet poster
 
Posts: 24
Default Is this crashing for you ?

Folks

Is this also crashing your Excel ?! If so anything obvious I might have missed ?

----

Sub doStuff()

Dim x As OLEObject
Dim aName As String

For Each x In ActiveSheet.OLEObjects

aName = x.Name

With ThisWorkbook.VBProject.VBComponents(ActiveSheet.Co deName).CodeModule
.InsertLines .CreateEventProc("Click", aName) + 1, _
"Msgbox ""Hi there"" "
End With

Next x

End Sub