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


Here is the case:

I have to adapt an old excel file. The person who made the file used
comboboxes from the FORM toolbar. How can I access these comboboxes
from within the code?

I read these objects doesn't fire events, so I gotta write a macro.
I wanna change the properties of a listbox when selecting a value in
another listbox. Deleting these objects and replacing them by ActiveX
objects isn't an option.

Somebody? :(


--
Johny
------------------------------------------------------------------------
Johny's Profile: http://www.excelforum.com/member.php...o&userid=30859
View this thread: http://www.excelforum.com/showthread...hreadid=505268

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Form toolbar

Dim drpdown as DropDown
for each drpdown in Activesheet.Dropdowns
drpdown.Select
msgbox drpdown.Name
next

These controls can have a macro assigned to them by right clicking on them
and from the popup menu select Assign Macro. This is then equivalent to a
click event macro.

Listboxes would be from the listboxes collection

Dim lbox as Listbox
for each lbox in Activesheet.ListBoxes

There are also collections for Spinners, Checkboxes, Optionbuttons, buttons
and Textboxes (from the drawing toolbar).

If you go into the VBE in the Object browser, right click on it and select
show hidden members.

You can then fine the dropdown and other forms objects and their properties
and methods.

If you want to send me an email with a good return address, I can send you a
file that has documentation on them. It is written for using them on dialog
sheets, but there isn't much difference between using them on dialog sheets
and using them on worksheets.

--
Regards,
Tom Ogilvy

"Johny" wrote in
message ...

Here is the case:

I have to adapt an old excel file. The person who made the file used
comboboxes from the FORM toolbar. How can I access these comboboxes
from within the code?

I read these objects doesn't fire events, so I gotta write a macro.
I wanna change the properties of a listbox when selecting a value in
another listbox. Deleting these objects and replacing them by ActiveX
objects isn't an option.

Somebody? :(


--
Johny
------------------------------------------------------------------------
Johny's Profile:

http://www.excelforum.com/member.php...o&userid=30859
View this thread: http://www.excelforum.com/showthread...hreadid=505268



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Form toolbar


thank you very much, this is all I needed to know.
It works perfectly!

I am kinda new to excel programming, any help is welcome. I'll send you
a pm!

edit: I see ya didn't register. I'll give my hotmail address then
instead of my work address, since this is a public forum




--
Johny
------------------------------------------------------------------------
Johny's Profile:
http://www.excelforum.com/member.php...o&userid=30859
View this thread: http://www.excelforum.com/showthread...hreadid=505268

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
Form Toolbar verses Control Toolbar ub Excel Discussion (Misc queries) 3 July 11th 08 10:57 PM
form toolbar Churley Excel Discussion (Misc queries) 2 June 18th 07 07:59 PM
Toolbar control for a form Robert Mulroney[_3_] Excel Programming 2 October 27th 05 01:37 AM
form toolbar Mervb Excel Discussion (Misc queries) 3 September 15th 05 02:11 PM
Adding a toolbar on a form John Riley Excel Programming 1 February 20th 04 09:09 PM


All times are GMT +1. The time now is 06:01 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"