Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Convert repetitive IF statements to array loop?


Leath,

I figured it out - I just forgot to put the reference to I in the With
Me line below:

With Me(ComboBoxArray) should be:

With Me(ComboBoxArray(I))

Thanks for your help pointing me in the right direction!

- Brian



Code:
--------------------
Dim ComboBoxArray(1 To 3) As String

ComboBoxArray(1) = "cboTestA"
ComboBoxArray(2) = "cboTestB"
ComboBoxArray(3) = "cboTestC"

For I = 1 To UBound(ComboBoxArray)
With Me(ComboBoxArray(I))
If .MatchFound = False Then .Value = ""
End With
Next I
--------------------


I am getting a type mismatch on the With Me(ComboBoxArray) line.

Any thoughts?

thanks!


--
bntringa
------------------------------------------------------------------------
bntringa's Profile: http://www.excelforum.com/member.php...o&userid=30523
View this thread: http://www.excelforum.com/showthread...hreadid=505863

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
Array formula with and/or statements Matthew[_2_] Excel Discussion (Misc queries) 4 May 15th 10 03:19 PM
Too Many IF Statements Nesting Error (Excel Formula Loop w/o VBA) retailmessiah[_2_] Excel Worksheet Functions 7 February 10th 10 06:52 PM
Need loop structure to get round limited IF statements karambos Excel Discussion (Misc queries) 5 August 30th 05 12:31 AM
Updating For Loop statements stuart Excel Programming 1 July 23rd 04 08:35 PM
variant array containing cel adresses convert to actual ranges-array Peter[_21_] Excel Programming 5 December 10th 03 09:50 PM


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

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"