+ Reply to Thread
Results 1 to 6 of 6

Show date and order number when the userform opens.

  1. #1
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Show date and order number when the userform opens.

    Hello

    What i need to do is this.

    When we open the userform1, then i need in textbox1 the current date and in textbox2 the NEW order number, starting with letter L.

    In my example as in column C of database sheet, there is not the order L1(exist only orders V1&v2), the order number that should appear in TextBox2 should be L1.

    Can you help me on this?

    Thanks in advance for any assistance!
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    11-26-2013
    Location
    Norway
    MS-Off Ver
    Excel 2013
    Posts
    67

    Re: Show date and order number when the userform opens.

    Hi

    Make column C on the data-sheet a named range call "OrderNumber", then right UserForm1, choose "View code" and paste this:
    Please Login or Register  to view this content.
    It takes a while to load so you might want to make the named range a little bit shorter.
    Best regards

    Per Erik Midtr?d

  3. #3
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Show date and order number when the userform opens.

    Please Login or Register  to view this content.

  4. #4
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Show date and order number when the userform opens.

    Hello

    perimidt

    Thank you. Your code does exactly what i need!

    Mr Phillips

    Thank you for your suggestion. A suggestion from an Excel Legend!I have read so many articles of you!

    Unfortunately-as i believe- my bad English didn't let me to explain well what i need so your code doe not works for me. Sorry for that!

    You can see my example to understand what i mean!
    Attached Files Attached Files

  5. #5
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Show date and order number when the userform opens.

    I didn't include the sheet name, so it worked only if Database was active. Easily fixed

    Please Login or Register  to view this content.
    A question for you. Where is Hania? Is that in Greece?
    Last edited by Bob Phillips; 12-23-2013 at 04:35 AM.

  6. #6
    Forum Contributor MariaPap's Avatar
    Join Date
    10-19-2013
    Location
    Chania-Crete-Greece
    MS-Off Ver
    Excel 2003-2010
    Posts
    319

    Re: Show date and order number when the userform opens.

    Yes Mr Phillips.

    Chania-Crete-Greece!!

    And YES, now works great. Thank you!

+ 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. UserForm label to show current date
    By Tomtril in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-13-2013, 06:57 AM
  2. [SOLVED] Have code for userform calendar but will not show todays date, please help
    By Jeff up North in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 02-05-2013, 03:05 PM
  3. Putting Spreadsheet Into Date Order After Submitting Userform
    By stuu3270 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-05-2013, 08:38 AM
  4. Replies: 1
    Last Post: 01-15-2012, 06:53 AM
  5. UserForm show cell value with the current Date and Tme
    By SunOffice in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-12-2011, 09:17 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