LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ayo Ayo is offline
external usenet poster
 
Posts: 489
Default Help with a very complicated For each Next code

I have a form with 26 DTPickers and 26 TextBoxes, with each DTPicker
associated to a TextBox by the name i.e. DTPicker1 is next to txtbx2,
DTPicker3 is next to txtbx4, DTPicker5 is next to txtbx6, ..., DTPicker55 is
next to txtbx56.
Now I am trying to write a code that does the following:

1.) For each DTPicker on the form, I want to check its value against every
DTPicker after it, for example if:
DTPicker1.value DTPicker3.value
then I want to change the Backcolor of txtbx2 to White. In other words, if:
For each DTPicker in UserForm2
For i=1 to 55 step 2
DTPicker(i).value DTPicker(i+2).value then:
txtbx(i+1).BackColor = &HFFFFFF
txtbx(i+1).ForeColor = &H0&

This is what I am trying to do in a nut shell but I can't figure out exactly
how to code it. Any help will be greatly appreciated.
Thanks
Ayo


 
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
Complicated Lookup Code dkk Excel Programming 2 March 12th 09 01:11 PM
a little complicated Gaurav[_2_] Excel Worksheet Functions 7 March 18th 08 12:12 AM
Help needed with Complicated code (For me !!) Les Excel Programming 8 July 9th 07 02:28 PM
This is more complicated than it looks. dollarbill79 Excel Worksheet Functions 11 July 13th 06 11:33 PM


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