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: 1
Default Convert repetitive IF statements to array loop?


Hey all,

I have a series of IF statements below that checks MatchFound and if
false, removes the erroneous data from the field.

A couple of questions for improving this.

1.) Can I create an array of the specified combo boxes for use in a
loop? I don't want to loop through ALL combo boxes on this particular
form, just the specified ones below.

2.) Can I pass the elements of the array such that they are recognized
as form fields below (eg Me.[ArrayElement1])?

Thanks everyone!

- Brian



Code:
--------------------
If Me.cboTestA.MatchFound = False Then
Me.cboTestA = ""
End If

If Me.cboTestB.MatchFound = False Then
Me.cboTestB = ""
End If

If Me.cboTestC.MatchFound = False Then
Me.cboTestC = ""
End If
--------------------


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

 
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 09:41 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"