Results 1 to 13 of 13

Highlight textbox if date <=60 days referencing an array as textbox numbers

Threaded View

  1. #2
    Forum Expert
    Join Date
    02-14-2009
    Location
    .
    MS-Off Ver
    ................
    Posts
    2,840

    Re: Highlight textbox if date <=60 days referencing an array as textbox numbers

    Assuming the code runs in a userform.

    Me.Controls("Ddtxt_" & j).BackColor...
    To loop through the controls.

    Dim j as Variant
    Dim k as Variant
    
     j = Array(27, 29, 31, 33, 35, 37, 39, 41)
    
    For each k in l
       'whatever
    Next
    Using a phone so not sure which is the problem for you, but that's how to loop through controls and 1 way to loop through an array.
    Last edited by cytop; 03-23-2017 at 10:19 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Excel 2010 - Userform - display date from textbox in a label or textbox in 'ddd' format
    By theshybutterfly in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-29-2015, 10:54 PM
  2. [SOLVED] Type in TextBox after referencing a different Textbox
    By WAYNE005 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-05-2014, 06:50 PM
  3. highlight textbox when selected
    By lifeseeker1019 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2014, 07:33 PM
  4. Highlight Row from TextBox in Userform
    By lsteinbach in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2013, 05:07 PM
  5. Highlight text within a textbox
    By jpruffle in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 04-07-2009, 02:30 PM
  6. [SOLVED] Highlight the contain of textbox and radio button
    By Peter Cheang in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-11-2006, 11:55 AM
  7. Highlight all Text in a Textbox when the textbox is selected
    By RPIJG in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-28-2005, 03:28 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1