+ Reply to Thread
Results 1 to 11 of 11

How can I overide my macro???????

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

    How can I overide my macro???????

    Hi,

    I have a code that selects a certain default "stub" when a certain "Hub" is selected. However, I sometimes wish to over ride this choice and choose a different
    stub. How can I do this? Would I be right in thinking it would be some kind of "else" command?




    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How can I overide my macro???????

    Couldn't you just select a different stub in ComboBox14 ?

    Here's another way to write your existing code.
    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 10-11-2016 at 10:00 AM.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

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

    Re: How can I overide my macro???????

    Thanks,

    I've tried it but I've lost the capacity to populate my Stub box based on Hub choice (the Stub box was populated with default choice as soona as a choose Hub). I still want the default to populate the Stub box
    but I'd like the capacity to overide it if I need to ?

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How can I overide my macro???????

    Quote Originally Posted by bralew View Post
    Thanks,

    I've tried it but I've lost the capacity to populate my Stub box based on Hub choice (the Stub box was populated with default choice as soona as a choose Hub). I still want the default to populate the Stub box
    but I'd like the capacity to overide it if I need to ?
    I don't really follow what all that means. Why can't you select a value in the Stub combobox?

    Otherwise, how is the code suppose to know when you want to override the default? What condition would exist that indicates you want to override the default that the code can test?

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

    Re: How can I overide my macro???????

    I know its complicated, I think I'm pushing the limits of VBA with this one

    Basically, When I select Hub (combobox7) it chooses a stub (combobox14) and it populates and additional H factor box(combobox23) with a specific reading.
    Sometimes the default stub for the hub, is not required and I have to choose another stub which will in turn give a new reading in combobox23.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How can I overide my macro???????

    It's not really that complicated. You just haven't taken the time to explain things.

    When you choose a Hub, and the code chooses a Stub based on your Hub selection, why can you then pick a different Stub in Combobox14 and override the Stub selected by the code?

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

    Re: How can I overide my macro???????

    Can I show you? I'll upload the file

    select 54 square on first userform and your in the main one.

    select hub A and it will choose a stub

    try and overide whilst preserving the changes


    My head really hurt Lol
    Attached Files Attached Files

  8. #8
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How can I overide my macro???????

    I choose Hub A and it chose STUBA001. Then I selected any Stub I want from the stub combobox.

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

    Re: How can I overide my macro???????

    did it fill the h-factor/ ill check now

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

    Re: How can I overide my macro???????

    Wonderful, thank you ever so much !!!!!! Sorry i missed it earlier on

    Thanks

  11. #11
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,643

    Re: How can I overide my macro???????

    Quote Originally Posted by bralew View Post
    did it fill the h-factor/ ill check now
    Very cryptic, but I think the answer is yes.

+ 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. How to overide a formula
    By shanni11 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-10-2016, 03:12 AM
  2. VBA overide fromula
    By OmarFahmy in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-15-2014, 05:09 AM
  3. [SOLVED] Manual Overide
    By Mel B in forum Excel General
    Replies: 4
    Last Post: 02-10-2013, 09:27 PM
  4. Overide Workbook Script
    By georgeeasten in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-25-2010, 06:25 AM
  5. overide conditional formatting with VBA
    By Code Flunkie in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-30-2010, 10:41 AM
  6. Save File Overide
    By pr4t3ek in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-17-2008, 09:15 PM
  7. Overide the data in list box?
    By ballack in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-26-2007, 03:27 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