+ Reply to Thread
Results 1 to 22 of 22

Can't fire unusual populated Box?

  1. #1
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Can't fire unusual populated Box?

    Morning All,

    Is it possible to execute a VBA code without being specific as to the contents. I already have the contents filled with correct information, I just require a particular ComboBox to activate something
    as soon as itself becomes populated?

    I'm trying to keep the maintenance as low as possible without being too complicated. It's proving challenging due to all the variables I'm juggling.
    Excuse my limited code as I'm trying to identify the concept. Any help would be gratefully received.



    Please Login or Register  to view this content.

  2. #2
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    Good morning.

    I'm not sure I follow that. Do you mean that when combobox7 changes, it should populate textbox47 only if combobox14 has something in it?
    Don
    Please remember to mark your thread 'Solved' when appropriate.

  3. #3
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Yeah, that's it. So i recognises an activity rather than a specific detail. I've got the detail already. Head scratcher this one :-/

  4. #4
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    Either of these should do the job
    Please Login or Register  to view this content.
    or
    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Thanks man. I've been reflecting on you initial advice of improving the workflow. As more variables are introduced the more I find myself re-directing information. Very challenging Lol

    I'll give this a whirl now

  6. #6
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Got this, probably something I've done??
    Attached Images Attached Images

  7. #7
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    I'd say either Textbox26 or Textbox47 (or both) is not numeric.

  8. #8
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Your right, I've changed the code and it works. However, I'm back to my old conundrum whereby the focus want entered information as opposed to data which populates as a result of a VBA code.

    I added the values:


    Please Login or Register  to view this content.

    It puts a 0 in the cell because it can't recognise the VBA input and prefers typed data. Is there any advice or should I look for another way? Unless, of course my addition is incorrect?
    Last edited by bralew; 11-08-2016 at 06:36 AM.

  9. #9
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    What exactly is the VBA input?

  10. #10
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    It just says "STUBC012", but the reason why I wanted it to fire from any old population is because there's hundreds of them. If I've got to be specific with the data its horrendous maintenance as I'll be updating two areas of VBA as opposed to 1.

  11. #11
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    I assume that is not in Textbox26 or Textbox47 since it isn't a number.

    The only way that that VBA code will put 0 in Textbox47 is if the value in either of the two textboxes is blank, 0 or not numeric.

  12. #12
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    No mate, it populates ComboBox14 which receives its input from ComboBox7?

  13. #13
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    I am aware that Combobox7 triggers the code and it then checks if Combobox14 is empty or not. If combobox14 is empty, the code doesn't do anything at all- it will not put a 0 anywhere. If combobox14 is empty, the code might put a 0 in textbox47 if the conditions I mentioned are true.

    Combobox14 is not populated by this code.

  14. #14
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Have a gander, I suspect there's an easier way but I'm buggered if I can think of it.

  15. #15
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    An easier way to do what? It is not at all clear to me what exactly it is that you think should be happening here, I'm afraid.

  16. #16
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Press Axle generator

    select 54 SQ
    select capacity 500
    Select Hub - C


    you'll see the stub box populate,
    Attached Files Attached Files

  17. #17
    Forum Guru xlnitwit's Avatar
    Join Date
    06-27-2016
    Location
    London
    MS-Off Ver
    Windows: 2010; Mac: 16.13 (O365)
    Posts
    7,085

    Re: Can't fire unusual populated Box?

    I will need an answer to my last question first- there is little point in me reviewing the file if I don't know what it is supposed to be doing.

  18. #18
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Can't fire unusual populated Box?

    bralew,

    You mentioned that "It puts a 0 in the cell because it can't recognise the VBA input and prefers typed data. Is there any advice or should I look for another way? Unless, of course my addition is incorrect?".
    Where is the 0 being put exactly? From what I've been reading here xlnitwit provided what you wanted but it is rather hard to follow the conversation. Can you restate exactly and concisely what exactly you want to achieve? Also, having the workbook instead of some images might help us follow the logic better.
    Please help by:

    Marking threads as closed once your issue is resolved. How? The Thread Tools at the top
    Any reputation (*) points appreciated. Not just by me, but by all those helping, so if you found someone's input useful, please take a second to click the * at the bottom left to let them know

    There are 10 kinds of people in this world... those who understand binary, and those who don't.

  19. #19
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    I'd like to select a Hub, say C, which will populate a box with the model which will then instantly give me the weight. It's easier on the other components but I don't know why

  20. #20
    Forum Expert Arkadi's Avatar
    Join Date
    02-13-2014
    Location
    Smiths Falls, Ontario, Canada
    MS-Off Ver
    Office 365
    Posts
    5,059

    Re: Can't fire unusual populated Box?

    Ok well I can see that
    Please Login or Register  to view this content.
    puts 0 because Textbox 47 is blank so textbox 26 times 0 = 0. You are using Textbox47 to calculate its own value.

  21. #21
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    Ahh right, ComboBox14 is supposed to put a weight in there, If you change the quantity it works

  22. #22
    Forum Contributor
    Join Date
    07-05-2016
    Location
    cardiff
    MS-Off Ver
    2010
    Posts
    787

    Re: Can't fire unusual populated Box?

    apologies lads, i had my code in the wrong sub change, thank you , ill update while i still have cognition
    Attached Images Attached Images

+ 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. Replies: 3
    Last Post: 09-30-2016, 10:48 AM
  2. Fire Apparatus
    By dfdparamedic in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-05-2016, 02:13 PM
  3. [SOLVED] Fire up Worksheet_Change
    By YasserKhalil in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-30-2014, 12:28 PM
  4. Need help for fire department
    By sta224ffemt in forum Excel General
    Replies: 2
    Last Post: 12-11-2006, 04:16 PM
  5. Unusual Request...
    By LewisAire in forum Excel General
    Replies: 0
    Last Post: 07-31-2006, 08:38 AM
  6. Code will not fire
    By Ray A in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-01-2006, 01:45 PM
  7. help with unusual sorting
    By howard11 in forum Excel General
    Replies: 4
    Last Post: 08-29-2005, 11:05 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