+ Reply to Thread
Results 1 to 5 of 5

The values of a command button determined by other userforms values

  1. #1
    Registered User
    Join Date
    07-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    The values of a command button determined by other userforms values

    Hello all!

    So, I have a workbook that has the following items:

    A command button to open a userform with multiple checkbox items to select. The selections are assigned a numerical value and are then summed to display a specific message in a cell.

    A command button to open another userform with two comboboxes in which the selected values (one one selection is permitted per combobox) are then displayed in a specific cell seperated by comma

    A final command button to make a specific calculation based on the values listed in the cells from the above command boxes

    What I cant seem to do is get the final command button to display the calculation:

    Please Login or Register  to view this content.
    When I hit the calculate button nothing displays in the box. Am I missing an execution?
    Last edited by Leith Ross; 07-28-2013 at 03:49 PM. Reason: Added Cide Tags

  2. #2
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,121

    Re: The values of a command button determined by other userforms values

    You are treating the variable names as literal strings.

    Try
    Please Login or Register  to view this content.
    David
    (*) Reputation points appreciated.

  3. #3
    Registered User
    Join Date
    07-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: The values of a command button determined by other userforms values

    Got it! Thanks. One more question if you dont mind. I have a second set of userform values to add into this:
    (see comments bold and underlined below)

    If recommendation = "go for it" And itemmsgbox = "United States,youth ball team" Then
    Worksheets(1).Range("Calculation").Value = "$197-$250"
    End If
    If recommendation = "larger need" And itemmesgbox = "United States,teen ball team" Then
    Worksheets(1).Range("Calculation").Value = "$250-$342"
    End If
    If recommendation = "larger need" And itemmesgbox = "United States,(and I want it to ignore anything that might be list in this area and only provide data based on the country or region, what would I do to get it to differentiate this?)" Then
    Worksheets(1).Range("Calculation").Value = "$250-$342"
    End If

  4. #4
    Registered User
    Join Date
    07-28-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    13

    Re: The values of a command button determined by other userforms values

    Just to clarify this a bit more. Only the country United States, youth ball requires the "youth ball" to calculate the $$ on the next line. If the country is United Kingdom I need it to ignore anything that follows the united kingdom,(ignore entry).

  5. #5
    Forum Expert Tinbendr's Avatar
    Join Date
    06-26-2012
    Location
    USA
    MS-Off Ver
    Office 2010
    Posts
    2,121

    Re: The values of a command button determined by other userforms values

    I might do something like this.
    Please Login or Register  to view this content.

+ 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] how to add the userforms to combobox and open it when pressing the command button ?
    By Shacker in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 05-12-2013, 09:10 AM
  2. Add a clear values code to command button
    By titantough in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-14-2011, 01:15 AM
  3. Command Button To Reset Values
    By Strugggler in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-18-2009, 10:54 PM
  4. [SOLVED] Command Button for PasteSpecial - Values - Transpose
    By Alisha in forum Excel General
    Replies: 0
    Last Post: 03-10-2006, 05:45 PM
  5. How can I add values in 2 cells using a command button
    By Dr.H.Subramanian in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-17-2005, 03:05 AM

Tags for this Thread

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