Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 273
Default activex controls

Quite an indepth sheet to sort data using various activex controls such as
combo box, option / tick box. Problem is when I run a macro and include the
function of a combo box, the macro does not recognise the box ? Call me
stupid but it is the control box type, must these contols have their own
macros assigned inoeder to work ? I have used these as a basis to the sheet
linking 1000's of calcs.
PS very urgent as sheet required Mon 16th May.
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,600
Default activex controls

Call me stupid but it is the control box type, must these contols have
their own
macros assigned inoeder to work ?


Morning Stupid, as you ask t.b. referred as :-)

Not exactly. Unlike controls from the Forms menu to which you do assign a
macro, those from the Controls Toolbox menu respond to "Events". From this
menu activate "Design Mode", select your control. right click, view code.

This should take you into the Sheet module with the Click event ready for
you to enter your code. Here you can either do your stuff or call a
procedure in a normal module, eg:

Private Sub CommandButton1_Click()
Dim var As Variant
Dim result As Variant
var = Range("A1").Value

result = MyFunc(var) ' MyFunc in a normal module

Range("B1").Value = result
End Sub

You will notice two dropdowns at the top of the module. From the left select
the name of the control and in the right you can select other Events in
which you can write your code. Typically you will only need the "Click"
event.

Regards,
Peter T



"Gary" wrote in message
...
Quite an indepth sheet to sort data using various activex controls such as
combo box, option / tick box. Problem is when I run a macro and include

the
function of a combo box, the macro does not recognise the box ? Call me
stupid but it is the control box type, must these contols have their own
macros assigned inoeder to work ? I have used these as a basis to the

sheet
linking 1000's of calcs.
PS very urgent as sheet required Mon 16th May.
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,120
Default activex controls

Gary,

You are not clear as to what you are doing and what the controls are for.
For instance, what does '... and include the function of a combo box ...'
mean?

--
HTH

Bob Phillips

"Gary" wrote in message
...
Quite an indepth sheet to sort data using various activex controls such as
combo box, option / tick box. Problem is when I run a macro and include

the
function of a combo box, the macro does not recognise the box ? Call me
stupid but it is the control box type, must these contols have their own
macros assigned inoeder to work ? I have used these as a basis to the

sheet
linking 1000's of calcs.
PS very urgent as sheet required Mon 16th May.
Thanks



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
ActiveX Controls leerem Excel Discussion (Misc queries) 0 December 11th 08 01:11 PM
Tab between ActiveX controls Tekhnikos Excel Discussion (Misc queries) 0 August 12th 08 03:42 PM
ActiveX Controls Charly Excel Discussion (Misc queries) 1 October 18th 06 01:53 PM
ActiveX Controls vs Form Controls Alex Excel Discussion (Misc queries) 1 January 11th 06 08:46 AM
ActiveX Controls David Fixemer Excel Programming 4 February 16th 04 05:20 PM


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

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

About Us

"It's about Microsoft Excel"