Consulting

Results 1 to 13 of 13

Thread: Solved: Macro hangs and need an extra step add to the macro

  1. #1
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    165
    Location

    Solved: Macro hangs and need an extra step add to the macro

    Firstly let me highlight a slight problem that might need correcting before we can being......At present if the user click the "Delete Supplier" macro button on worksheet "Deal Selecton" IT HANGS....this is because it is step up to look for a corresponding worksheet.

    So if i was to delete Repsol then > it would also delete the worksheet Repsol.....if there is no worksheet of that name present in the workbook IT HANGS........

    1. So is it possible to delete what ever supplier name the user selects (worksheet "Deal Selection" column B) irrespective or not a worksheet of that name is in the workbook.....if the workbook is present then also delete it too.

    2. KNOW if i delete a supplier name from column B worksheet "Deal Selection" then >

    I also want to remove from the following worksheets (Allocaction (base) + (Vol) +(Sc.1) + (Sc.2) and (Sc.3) - for agrument shake

    Say i was to delete Repsol from Column B then > also delete from the above mentioned worksheet Repol from column B:E in worksheets (Allocaction (base) + (Vol) +(Sc.1) + (Sc.2) and (Sc.3)........

    See highlight data as a guide.......

    Thi question is also posted on link: http://www.experts-exchange.com/Soft..._23407697.html

  2. #2
    Super Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,005
    Location
    Keliah, you have a solution at Experts Exchange, however, you have to pay for it!
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  3. #3
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    165
    Location
    yes that is true and no answer....sometime you have to go back to your roots to find a solution to the problem.........i am guessing that they are not up to it.......

  4. #4
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    165
    Location
    can this be done???????

  5. #5
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi,

    Did you see the answer at EE? (Thanks but no thanks...) I saw this question there a while ago and even considered it myself, briefly.

    Yes it can be done... but probably not for free - It's just way too much work!

    I can see what you're trying to do but the code is a bit of a mess and would have to be fixed and debugged before anything could really happen.

    I'm guessing that's what Simon means when he says "you'll have to pay for it"

    Just my 2 cents worth <G>
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  6. #6
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    165
    Location
    Can some please delete this question for me...

    Thanks

  7. #7
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Quote Originally Posted by rbrhodes
    ... (Thanks but no thanks...) ...
    Does that refer to EE?
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  8. #8
    VBAX Contributor
    Joined
    Aug 2007
    Posts
    165
    Location
    this question has already been deleted from EE.....not sure how to close it on this forum

  9. #9
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Just marked it as Solved, it will soon drop off.
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  10. #10
    Super Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,005
    Location
    Quote Originally Posted by rbrhodes
    I'm guessing that's what Simon means when he says "you'll have to pay for it"

    Just my 2 cents worth <G>
    rbrhodes, i wasn't being bloody minded, i don't belong to EE but i do know that if you post a question and want to view the solution "you have to pay for it". I havent seen the original workbook or code but if its as bad as you say surely it would be better starting a new?, that way sensible portioned questions could be asked without the size of the task putting off people giving free help.
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  11. #11
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hello all,

    Firstly, apologies to Simon. I don't know what "bloody minded" means exactly but I can imagine its not good. Sorry for any perceived insult.

    I am, and have been a member of EE for a long time (I guess I got in while the getting was good, ie free) and contributed there regularly. I was actually 'recruited' from there by Dreamboat to here...way back when.

    I've written yards of code for free for users at EE, VBAExpress, OzGrid, ExcelForum, etc.

    My point being is that I had already looked at the EE post and passed on it.

    Having discovered what I thought was an interesting problem (again) here, I looked at the Xpost at EE and recognized it, of course.

    So I logged in and viewed the 'solution'. The solution was, as I tried to say in my previous post, essentially: "Thanks but no thanks. Sorry."

    I would post the 'solution' here but I'm not sure that's good form. Anyways: no solution just comments on the code and the amount of time it would take to rebuild it, etc. All totally valid BTW.

    As for "starting anew" I just attemped that... 13 hours of programming and I think I'm close. Too much fun!



    Ahh... Just attempted to open the fle to attach it here. Gone!

    Here's the Message:

    Microsoft Excel File Repair Log

    Errors were detected in file 'C:\Documents and Settings\dr\My Documents\keilah by dr.xls'
    The following is a list of repairs:
    Damage to the file was so extensive that repairs were not possible. Excel attempted to recover your formulas and values, but some data may have been lost or corrupted.

    And the result is a bare bones file with no formatting, userforms or VBA! Now I truly see what the EE message was about! 13 hours of programming, carefully saving after every change of code and *poof*


    keilah, "Life is interesting if you're nae weak.!"

    I'll look at it again tomorrow...
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

  12. #12
    Super Moderator VBAX Guru Simon Lloyd's Avatar
    Joined
    Sep 2005
    Location
    UK
    Posts
    3,005
    Location
    rbrhodes, "Bloody minded" means having no understanding of anyone else and believing your view is correct!

    13 hours? far too much, i understand your dedication and perhaps intrest but thats a paying job way beyond the free help margin!
    Regards,
    Simon
    Please read this before cross posting!
    In the unlikely event you didn't get your answer here try Microsoft Office Discussion @ The Code Cage
    If I have seen further it is by standing on the shoulders of giants.
    Isaac Newton, Letter to Robert Hooke, February 5, 1675 English mathematician & physicist (1642 - 1727)

  13. #13
    VBAX Expert
    Joined
    Feb 2005
    Location
    Nanaimo, British Columbia, Cananda
    Posts
    568
    Location
    Hi,

    Simon, I started my original post by asking whether you had seen the file and/or the EE solution. Somehow I decided that you had and that you concurred with the opinion at EE, Sorry about that, I think that's where the misunderstanding came from. I certainly wasn't implying "bloody mindedness"! (Thanks for the explanation)

    Yes too many hours! I took it upon myself to understand All of the code so that writing a solution didn't mess up something else. It's a rather large code base so that took a while - not to mention translating some R1C1 for my feeble brain!

    Of course I also inserted 'Option Explicit', dimmed all the variables, built two new forms to replace the InputBoxes, etc. A job really but I enjoy a challenge!

    Imagine my surprise when I decided it was in a somewhat finished state only to open the file and it was all gone!!!!!! Saving a file doesn't mean you'll ever see it again. Lesson learned.

    1) Save your work
    2) Save it as a different name
    3) Save it again, repeat.
    4) EXPORT your modules

    Perhaps that way I would have got the code back at least.

    Fairly basic <g> lesson that I've learned many times about files themselves - first time for code. So "All's well that ends."
    Cheers,

    dr

    "Questions, help and advice for free, small projects by donation. large projects by quote"

    http:\\www.ExcelVBA.joellerabu.com

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •