+ Reply to Thread
Results 1 to 4 of 4

Textbox 2 Value is formula based on Texbox 1

  1. #1
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Question Textbox 2 Value is formula based on Texbox 1

    Morning All,

    Hope you guys can help me.

    I have 2 textboxes, textbox1 and textbox 2 for arguements sake.

    what i would like is to put a date in textbox 1.

    textbox 2 then calculates the week using this formula:

    =TRUNC(Textbox1-Date(Year(Textbox1),1,0)+6))/7)

    or something like that anyway how would i go about doing that.

    obviously i'd place code into the "textbox1_change" module.

    thanks for reading guys!!
    Mr MaGoo
    Magoo.Inc MMVII

    If i've helped please add to my Rep by Clicking on the Blue Scales in the top right hand corner of the post

  2. #2
    Forum Expert
    Join Date
    11-23-2005
    Location
    Rome
    MS-Off Ver
    Ms Office 2016
    Posts
    1,628
    Try to use this code:
    Please Login or Register  to view this content.
    I hope it's what you need.

    Regards,
    Antonio

  3. #3
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,480
    Hi,
    You did not mention where these textboxs are from so I will assume they are from the controls toolbar

    Here's one way,
    Place this function into a regular module
    Please Login or Register  to view this content.
    This code can go into the worksheet module that has the textboxes
    Please Login or Register  to view this content.
    The code would be very similar if the text boxes are in a UserForm

  4. #4
    Valued Forum Contributor Macdave_19's Avatar
    Join Date
    03-14-2007
    Location
    Birmingham, England
    MS-Off Ver
    12.0
    Posts
    808

    Ta

    Cheers both you guys i'll give them a blast, FYI the textboxes are in a userform.


+ 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