Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Debug ActiveX object

Hello

I add in worksheet one combobox (Forms not Control ToolBox) with the
properties set via code.
I need to debug the code step by step in VBA IDE, but receved the message
("Can't enter break code at this time.") when the code enter in the combo
box properties.

Is a way to Debug the code step by step in VBA IDE

thank's

------------------------------------
maybe humans, but still ANIMALS
------------------------------------


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 459
Default Debug ActiveX object

ActiveX controls are from the Controls ToolBox, not the Forms toolbar
(but if you are adding them dynamically you are using neither
toolbar!). If you really do mean ActiveX controls then no, you can't
step through your code because OLEObjects that get added
programmatically aren't fully mature in the eyes of the code engine
(to quote Excel MVP, Dick Kusleika) at this time.

As a workaround, you could strategically add lines of code to print
information to the VBE Immediate Window at run-time using Debug.Print
i.e.

Sub test()
Dim oOle As Object
Set oOle = Sheet1.OLEObjects.Add("Forms.OptionButton.1")
Debug.Print oOle.Name
oOle.Name = "NewNameHere"
Debug.Print oOle.Name
End Sub

--

"Carlos" wrote in message ...
Hello

I add in worksheet one combobox (Forms not Control ToolBox) with the
properties set via code.
I need to debug the code step by step in VBA IDE, but receved the message
("Can't enter break code at this time.") when the code enter in the combo
box properties.

Is a way to Debug the code step by step in VBA IDE

thank's

------------------------------------
maybe humans, but still ANIMALS
------------------------------------

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Debug ActiveX object

Thank's for infomation


"onedaywhen" wrote in message
om...
ActiveX controls are from the Controls ToolBox, not the Forms toolbar
(but if you are adding them dynamically you are using neither
toolbar!). If you really do mean ActiveX controls then no, you can't
step through your code because OLEObjects that get added
programmatically aren't fully mature in the eyes of the code engine
(to quote Excel MVP, Dick Kusleika) at this time.

As a workaround, you could strategically add lines of code to print
information to the VBE Immediate Window at run-time using Debug.Print
i.e.

Sub test()
Dim oOle As Object
Set oOle = Sheet1.OLEObjects.Add("Forms.OptionButton.1")
Debug.Print oOle.Name
oOle.Name = "NewNameHere"
Debug.Print oOle.Name
End Sub

--

"Carlos" wrote in message

...
Hello

I add in worksheet one combobox (Forms not Control ToolBox) with the
properties set via code.
I need to debug the code step by step in VBA IDE, but receved the

message
("Can't enter break code at this time.") when the code enter in the

combo
box properties.

Is a way to Debug the code step by step in VBA IDE

thank's

------------------------------------
maybe humans, but still ANIMALS
------------------------------------



Reply
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
How to kill an ActiveX object Django Cat[_2_] Excel Discussion (Misc queries) 3 November 8th 07 07:45 PM
Activex component can't create object Naveen New Users to Excel 1 September 4th 07 02:57 PM
ActiveX Component Can't create object - Any Explainations? gopalan Excel Programming 0 January 5th 04 03:25 PM
DsoFile ActiveX component can't create object on other computers Jeremy Gollehon[_2_] Excel Programming 1 August 18th 03 09:44 PM
activex component can't create object with SAP 6.20 Mark Bigelow Excel Programming 0 July 22nd 03 06:24 PM


All times are GMT +1. The time now is 10:11 AM.

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"