Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Multiple "With" commands - Please help

HELP

I have a screen full of comboboxes and when I initiate the form I want
to populate the drop downs.
I want to populate many of them with the same info but cannot work out
the WITH commands to populate many boxes with the same info.

i.e. With cboxDay1,cboxDay2
.add ("1")
.add ("2")
End With

- This command does not work

Please help
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default Multiple "With" commands - Please help

You could loop through all the comboboxes and set each individually, or you
could just set one and "copy" to the others.

I put 6 comboboxes (cboxday1 through cboxday6) on a worksheet:

Dim iCtr As Long
With Worksheets("sheet1")
With .OLEObjects("cboxday1").Object
.Clear
.AddItem 1
.AddItem 2
.AddItem 3
End With
For iCtr = 2 To 6
.OLEObjects("cboxday" & iCtr).Object.List _
= .OLEObjects("cboxday1").Object.List
Next iCtr
End With

Azza wrote:

HELP

I have a screen full of comboboxes and when I initiate the form I want
to populate the drop downs.
I want to populate many of them with the same info but cannot work out
the WITH commands to populate many boxes with the same info.

i.e. With cboxDay1,cboxDay2
.add ("1")
.add ("2")
End With

- This command does not work

Please help


--

Dave Peterson

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
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
Multiple "source" workbooks linked to single "destination" workboo DAVEJAY Excel Worksheet Functions 1 September 17th 07 05:33 PM
how can I still use the "/" lotus commands with Excel 2003 SP2 Rich Excel Discussion (Misc queries) 2 October 24th 06 03:07 PM
Formulas to speed up many manual "=()" commands Cantab Excel Worksheet Functions 2 August 19th 06 11:28 PM
"end" + "down" commands not working leo Excel Discussion (Misc queries) 2 May 30th 06 08:24 PM


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