+ Reply to Thread
Results 1 to 3 of 3

New Sum and label caption not working

  1. #1
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    New Sum and label caption not working

    Hello everyone.

    I have sticky situation I am trying to get out of quickly. I thought I had come up with a quick fix, but things are not going as planned.

    Take a look a the code below. What is important is the variable "Total Volume". This block of code works flawlessly, in particular the label "Total Volume" appears and the numerical value of Total Volume is correct.

    Please Login or Register  to view this content.
    Now, I am trying to modify that code block or script to include a new Label and variable called "Total Margin". Now this new label has been drawn onto the Userform that it is to appear, in fact it is adjacent to "Total Volume". So hear is the modified code:

    Please Login or Register  to view this content.
    First probem, the label does not show at all and secondly no sum of "Total Margin" appears on the label (due to the first problem). All the relevant data is stored correctly in the Access table. Both "Total Volume" and "Total Margin" are declared as Private variables and as double. Any help is greatly appreciated.
    Last edited by AnthonyWB; 01-31-2011 at 11:48 AM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,982

    Re: New Sum and label caption not working

    You don't have any code to set its caption in there (you set the caption for total volume). Also, if the Volume is greater than 0, then you don't test the margin at all.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    03-30-2010
    Location
    Washington DC
    MS-Off Ver
    Excel 2007
    Posts
    458

    Re: New Sum and label caption not working

    Thank you Romperstomper,

    Now both the label "Total Margin" and the numerical value of the "Total margin" are displayed correctly. See the corrected code below,

    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)

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