+ Reply to Thread
Results 1 to 3 of 3

For Each Loop Works for Textboxes but Not for DTPickers.... why?

  1. #1
    Forum Contributor
    Join Date
    04-23-2014
    Location
    Liverpool...ish
    MS-Off Ver
    Excel 2013
    Posts
    126

    For Each Loop Works for Textboxes but Not for DTPickers.... why?

    Can someone explain to me why this code works:
    Please Login or Register  to view this content.
    And this one does not:
    Please Login or Register  to view this content.
    Is there something different with the DTPicker control that I should be aware of?

    Regards
    Scott

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: For Each Loop Works for Textboxes but Not for DTPickers.... why?

    The fact that the dtpicker doesn't come as a standard control may have some bearing.

    it might be worth referring to it by it's name rather than type. e.g.
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Contributor
    Join Date
    04-23-2014
    Location
    Liverpool...ish
    MS-Off Ver
    Excel 2013
    Posts
    126

    Re: For Each Loop Works for Textboxes but Not for DTPickers.... why?

    Richard thanks for the reply. I was going to ask you how you would implement that without naming all 22 of my datepickers when the thought occured to me that its name isn't 'DTPicker" at all... it is "DTPicker2".... works fine when you name the control correctly.

    Regards

    Scott
    Last edited by TheScott; 06-03-2015 at 06:13 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Seeking help with VB UserForm that has 2 DTPickers
    By leopardhawk in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-04-2013, 12:57 PM
  2. [SOLVED] VBA UserForm using two DTPickers gives errors when time 'NEXT DAY'
    By leopardhawk in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-04-2013, 11:16 AM
  3. Loop textboxes(activex)
    By sohaila in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-10-2013, 05:18 AM
  4. [SOLVED] If then loop needed for Textboxes
    By minifreak in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-23-2012, 08:22 AM
  5. Loop into TextBoxes in an UserForm
    By pierre08 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-15-2010, 09:38 AM

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