Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Folks
Any chance to have the following code running ? 1. --- Class module Option Explicit Public WithEvents myObj As Excel.OLEObject Private Sub myObj_GotFocus() MsgBox "focus" End Sub 2. --- Module Option Explicit Dim myButtons() As New clsMyOLEObj Sub doStuff() Dim x As OLEObject Dim numItems As Integer numItems = 0 For Each x In ActiveSheet.OLEObjects numItems = numItems + 1 ReDim Preserve myButtons(1 To numItems) Set myButtons(numItems).myObj = x Next x End Sub The idea is to "take over" the OLEObjects and have one centralized processing. I'm doing (as per John Walkenbach http://j-walk.com/ss/excel/tips/tip44.htm ) similar things with userforms controls and it works well. However my code above fails when assigning to myButtons(numItems). Any idea ? Thanks & regards --AlexT |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
OLEObjects clickable? | Excel Programming | |||
Glolbal Variables Reset when using OleObjects | Excel Programming | |||
Assigning click event to OleObjects checkbox | Excel Programming | |||
Referring to OLEObjects (combobox's on worksheet) | Excel Programming |