Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
I am using visual basic 6.When I add a reference to Microsoft Excel 11.0
object library and run the program, it gives an error Compile error: Object does not source automation events. The programs works fine when the reference is removed.I am not sure why its happening? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
The first thing I would try is running Excel with the /regserver
switch, to instruct Excel to reset all its registry/typelib information. With Excel closed, go to the Windows Start menu, choose Run, and enter Excel.exe /regserver This will cause Excel to start, rewrite all of its registry information, and then quit. Recompile your VB6 program. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "josh7" wrote in message ... I am using visual basic 6.When I add a reference to Microsoft Excel 11.0 object library and run the program, it gives an error Compile error: Object does not source automation events. The programs works fine when the reference is removed.I am not sure why its happening? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
I am using the following statement in general declarations in vb 6.0
Private withevents ctrToolBar as Toolbar I tried using Excel.exe /regserver but its still giving the same error "Chip Pearson" wrote: The first thing I would try is running Excel with the /regserver switch, to instruct Excel to reset all its registry/typelib information. With Excel closed, go to the Windows Start menu, choose Run, and enter Excel.exe /regserver This will cause Excel to start, rewrite all of its registry information, and then quit. Recompile your VB6 program. -- Cordially, Chip Pearson Microsoft MVP - Excel Pearson Software Consulting, LLC www.cpearson.com "josh7" wrote in message ... I am using visual basic 6.When I add a reference to Microsoft Excel 11.0 object library and run the program, it gives an error Compile error: Object does not source automation events. The programs works fine when the reference is removed.I am not sure why its happening? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
Oops,
the Toolbar object has been discontinued from XL97 onwards, pls use the more modern Commandbar object. It is only available in XL for backward compatability. Also the Toolbar object as given by XL typelib has no events(so withevents would not make any sense), The Commandbar model has some btw (for the individual controls and for the collection) DM Unseen |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
The tool bar that i am using is from the windows common controls in vb 6 not
in excel. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
Then you have a typelib conflict!
pls prefix the Toolbar type definition with the actual typelib name to distinguish it form the Toolbar object in the XL typelib(look it up in the object browser) e.g. Private withevents ctrToolBar as MyTypelib.Toolbar Dm Unseen |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
object does not source automation events
You are right,I am having a typelib conflict
Thank you, Joshua "DM Unseen" wrote: Then you have a typelib conflict! pls prefix the Toolbar type definition with the actual typelib name to distinguish it form the Toolbar object in the XL typelib(look it up in the object browser) e.g. Private withevents ctrToolBar as MyTypelib.Toolbar Dm Unseen |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
monthly cycle events to add to calendar object | Excel Discussion (Misc queries) | |||
Using Events with the Application Object & XL 2003 | Excel Programming | |||
Late Bound Object Click Events | Excel Programming | |||
Automation Events | Excel Programming | |||
XL2000: Shape object events | Excel Programming |