+ Reply to Thread
Results 1 to 6 of 6

Textbox to fill with max formula result

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

    Textbox to fill with max formula result

    Hello

    I try to fill a textbox in a userform with the result of a max formula of a certain sheet, but no result..

    What i try is this.

    Please Login or Register  to view this content.
    Any help on this?

    Thank you in advance

  2. #2
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Textbox to fill with max formula result

    Hi Maria,

    See the attached where I got it to work. See my code of below and where I've placed it..

    Me.TextBox1.Value = WorksheetFunction.Max(Application.ActiveSheet.Range("A1:A50"))


    Userform TextBox Max Value Test.xlsm
    One test is worth a thousand opinions.
    Click the * Add Reputation below to say thanks.

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

    Re: Textbox to fill with max formula result

    Thank you Mr Marvin

    Certainly works if i open the userform from sheet1.

    But if i want to open it from another sheet ?

    Please Login or Register  to view this content.
    Does not works
    Attached Files Attached Files

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,167

    Re: Textbox to fill with max formula result

    Hi Maria,

    If you want to get the max from another sheet try something like this:
    Please Login or Register  to view this content.
    Is this what you wanted? If not then you should supply a sample workbook so we can get a better understanding of the problem.

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Textbox to fill with max formula result

    Add one dot and move one parenthesis
    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  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: Textbox to fill with max formula result

    Thank both of you.

    Apologize for the delay of my respond but i had no conection with the forum until now.

    Mr Mike suggestion works great for me.

    Regards

+ 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. Excel 2010 – VBA Userforms – Vlookup via Textbox, display result in another textbox
    By theshybutterfly in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 03-29-2015, 12:31 AM
  2. [SOLVED] VBA to fill a formula in a cell until the result from the formula is 1
    By Invicta084 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 02-20-2015, 02:22 AM
  3. Replies: 29
    Last Post: 01-09-2015, 05:39 PM
  4. Userform textbox value with formula creates a result in excel
    By Sc0tt1e in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-02-2013, 05:21 PM
  5. [SOLVED] VBA UserForm - Have entry in TextBox fill Another TextBox by VLOOKUP
    By msquared99 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-26-2012, 10:24 PM
  6. [SOLVED] How do I quickly fill a formula result into a column of cells?
    By ckirch in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-12-2005, 12:05 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