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: 68
Default Looping Problem

Below is a code I am trying to modify.

For Each Item In NoDupes
OrderForm.ComboBox1.AddItem Item
Next Item

The above code works but is not what I need. Because the actual ComboBox
will not always be ComboBox1, I need to make the code dynamic. I need the
code to look in cell V1 on worksheets(8) for the value. This value in that
cell will be the current combobox that needs to be in the code. For
example, lets say the value in cell V1 in worksheets(8) is "CombBox9", then
I would need for the code to reference combobox9. So how would I write this
code?

I tried the below modification and it failed.
For Each Item In NoDupes
OrderForm.Worksheets(8).Range("V1").Value.AddItem Item
Next Item

When I ran it, I got an error that said Complie error. Method or data
member not found.


Thanks in advance.

Todd Huttenstine


 
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
Scrolling Looping Problem Nick Wakeham Excel Discussion (Misc queries) 0 June 12th 07 01:42 PM
Macro looping problem. [email protected] Excel Discussion (Misc queries) 8 October 26th 06 02:44 PM
Looping [email protected] Excel Programming 0 October 31st 03 07:47 PM
looping formula - r1c1 problem - Con't MDC[_2_] Excel Programming 0 October 22nd 03 11:42 PM
looping formula - r1c1 problem MDC[_2_] Excel Programming 2 October 22nd 03 11:13 PM


All times are GMT +1. The time now is 02:29 AM.

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"