+ Reply to Thread
Results 1 to 23 of 23

Date entry problem

  1. #1
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Date entry problem

    Help with code to run in excel 2007
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 07-15-2010 at 05:18 PM. Reason: Fixed code tags

  2. #2
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Date entry problem

    hI Headworth
    along long stabe in the dark
    Please Login or Register  to view this content.
    A bit more of an explination will help
    If the solution helped please donate to RSPCA

    Site worth visiting: Rabbitohs

  3. #3
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi Pike
    I have a database that has 12 columns in column B are dates each time i run the block of code it will populate 9 columns’ I would like to populate 10 columns the 10 one being the dates. This code populates 15 rows each time I run it .So as you can see it will put the first 2 dates in but I cannot get it to continue to put the next date if you run this it puts 01/04/2010 and then it puts 02/04/2010 but then it goes on putting 02/04/2010 each time .I need it to put 03, then 04, and on to end of sheet

    Regards Headworth

  4. #4
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Date entry problem

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi snb
    your code works fine but it goes across the columns i need it go down column B and for the date to stay the same for 15 rows at a time and then change to next date for 15 rows etc

    Regards Headworth

  6. #6
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Date entry problem

    Hi Headworth,
    A workbook would help

  7. #7
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi Pike
    I have add Workbook Attachment
    Thank you for your help

    Regards
    Headworth
    Attached Files Attached Files

  8. #8
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Date entry problem

    hm.. maybe
    Please Login or Register  to view this content.

  9. #9
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Date entry problem

    Please Login or Register  to view this content.

  10. #10
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi Pike

    I tried your code no luck

    In my first post the code will work fine if i use column A
    can you see why this will not work in column B
    or do you know away with a macro to sort and filter using column B if i move Code ID to column B

    Regards
    Headworth

  11. #11
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Date entry problem

    Hi Headworth,
    what are we doing again as im a little lost?

  12. #12
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Date entry problem

    @headworth

    Did you overlook this post ?

  13. #13
    Forum Expert pike's Avatar
    Join Date
    12-11-2005
    Location
    Alstonville, Australia
    MS-Off Ver
    2016
    Posts
    5,330

    Re: Date entry problem

    maybe
    Please Login or Register  to view this content.

  14. #14
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi snb
    sorry no i did not over look your post
    when I add this to my code I cannot get it to work

    Regards
    Headworth

  15. #15
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    maybe
    but what year is this your code for it starts at the year date 25/11/4770

    thank you for all your help
    I am going back to my first post and will change column A and B around
    and try and find a way to sort and filter the data using column B with Code ID their must be a way?

    Regards
    Headworth

  16. #16
    Forum Expert snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,649

    Re: Date entry problem

    Please open the attachment and click the button.
    Attached Files Attached Files

  17. #17
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date entry problem

    I think this thread deserves an award for the most confusing explanation & OP's code that I have ever seen!
    Hope that helps.

    RoyUK
    --------
    For Excel Tips & Solutions, free examples and tutorials why not check out my web site

    Free DataBaseForm example

  18. #18
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi snb
    Thank you for not giving up on me your code is great!!
    I think for me I will use 2 buttons one with your code and if I can I will add days to your code

    Best Regards
    Headworth

  19. #19
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date entry problem

    Try this
    Please Login or Register  to view this content.

  20. #20
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date entry problem

    This is more dynamic allowing the user toinput the first date
    Please Login or Register  to view this content.

  21. #21
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Hi RoyUk
    Thank you for your code
    Please could I ask you to change the code to put 01/04/2010 in 15 rows and code stop
    then when I run the code again it would put 02/04/2010 for 15 rows adding 1 date each time Monday to Friday
    for Saturday and Sunnday it would 9 rows

    Regards Headworth

  22. #22
    Forum Expert royUK's Avatar
    Join Date
    11-18-2003
    Location
    Derbyshire,UK
    MS-Off Ver
    Xp; 2007; 2010
    Posts
    26,200

    Re: Date entry problem

    I don't understand,seems like you wanted blocks of 15 dates before

  23. #23
    Registered User
    Join Date
    05-06-2009
    Location
    Redhill
    MS-Off Ver
    Excel 2003
    Posts
    18

    Re: Date entry problem

    Yes blocks 15 that change each day the database is updated on the attachment I uploaded it shows
    each day monday to friday the records are changed so your code is fine for 3 days but if I run it again it will put the same dates in again I am sorry for the misunderstanding
    What I can not understand is the first post I made the code worked in column A but will not work in B

    Regards Headworth

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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