LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default On-Worksheet ActiveX Controls - is there a bug in the Excel engine??

Hi

Can any MVP explain the intermittent errors I & others get when Excel won't
complete the Workbook_Open event, with the message

"Can't exit design mode because Control <control type (or Name?) can not
be created"

My app has some ActiveX controls placed on a few worksheets as a friendly
way of invoking macros and/or Forms. e.g. my Buttons sheet (hence my UG
name) has several option buttons and a nice big Go button.

I get the error (only sometimes - maddeningly) when WBOpen activates the
Buttons sheet at the end.
It scared the pants off me that I had a corrupt workbook, but it seems that
all is actually well if you switch worksheets to "Buttons" manually and
carry on as normal. But that's no way to write an app.

I've seen complaints about this since Excel 97 & 2K, mainly from less
experienced users, but no authoritative explanation of what's going on.

I'm GUESSING from hints in what I've read, that it may be something to do
with compiling;
that plain vanilla code can execute before ALL the references in every part
of the code have been fully resolved - or something vaguely like that.

Does anyone know what happens behind the scenes when you load a workbook ?
e.g. Are there two paths for the VB engine code depending on whether or the
engine discovers the code needs compiling because the developer hadn't done
so before save on close?

Could it be that my probs will go away by always compiling before save?
Could I rely on that?
Will it stand up to users practices (who won't change the VB code, only the
data)?
It just feels flakey at present, so I'm worried.

Oh yes! One other thing. I use CodeCleaner (indeed I even wrote my own with
a bit of help from Chip Pearson a few years ago), so it isn't an accumulated
cr*p issue.


I planned to post this to the Userform group (where ActiveX controls are
normal), but that UG seems moribund - only one post this year

And I want to start another more specific Userform thread soon too. This
seems the best place unless you say otherwise.


spilly

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Activex controls on worksheet spontaneously resize Russell Reid Excel Programming 1 March 19th 07 09:23 PM
Tab between ActiveX controls on an Excel worksheet Bill[_27_] Excel Programming 3 September 9th 04 01:15 PM
Tab support for worksheet activex controls Aaron[_9_] Excel Programming 0 December 30th 03 08:08 PM
tabbing through ActiveX controls on worksheet Mike Rollins Excel Programming 1 October 3rd 03 09:12 PM
Problems with worksheet containing ActiveX controls Deane Yang Excel Programming 1 August 21st 03 04:36 AM


All times are GMT +1. The time now is 02:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"