Posts by NoNonFreeSoftwr

    Re: $40 Help getting Excel to run correctly again

    Good question. I believe almost all of the custom ribbon buttons were created through the excel UI, but a few might have created a different way via some macro that I had developed. Since my last time loggin in here, I removed MS office and then eventually reinstalled windows. I am still in the process of creating new ribbon buttons as I need them.

    Re: $40 Help getting Excel to run correctly again

    It looks like I was mistaken in my description of the problem yesterday. I looked at the path of a ribbon button macro that did still work, and ones that do not work and they both showed the same type of path


    None of the subroutine names matched the name of the module they were located in. It is unlikely that any of the subroutine names, at least the ones that are ribbon buttons, have the same subroutine name as found in another module. However there are multiple copies of personal.xlsb located in backup subfolders within that folder \Excel


    When I push one of the custom ribbon buttons I have, on some, but not all of the buttons I get "cannot run the macro 'personal.xlsb!somesubroutinename. The macro may not be available in this workbook or all macros may be disabled".

    For the buttons that do work (where the macro does run), to me it looks like the path is personal.xlsb!modulename.subroutinename. It is my guess that somehow the modulename's were removed from the path that many of the custum buttons point to.

    Not sure what to do on this one, any help appreciated. I have reinstalled Excel once or twice with no luck.

    I am stuck on this problem and know I am missing some key point since it has been awhile since I have done any VBA programming.

    I have an array of type Shape


    I want to create an array Arr2 so that it's results are the sort of Arr1 where Arr1 is sorted based on the .TOP position of each of it's shapes, starting with the lowest .TOP postion and increasing

    Any help appreciated, thanks

    Re: Linked Lists

    I thought I would work on the Linked Lists project tonight and created 1 new method - sReverse. The sReverse method reverse the order of the linked list that sList points to, in other words it just reverse the order of a linked list. Not an easy method to write for some reason.

    Re: Linked Lists

    Not sure what happened with the code above, here is the test code

    Re: Linked Lists

    [FONT=&quot]It looks like it only crashes only if an individual sList Object contains more than about 2500 nodes. I was able to create a total of 25,000,000 sListNode objects contained in 10,000 sList Objects without excel crashing. I would guess that most data structures that use singly linked lists do not put thousands of data points within one sList object.[/FONT]

    Re: Linked Lists

    I forgot to mention, the method sGetNth was a difficult one for me to write. I tried to do the recursive solution that seems to be commonly taught. I could not find a way to do it unless I had a private helper function in order for the recursion to work. Any ideas suggestions to improve the code for any of the methods is appreciated. Also I know I a missing at least 2 common methods which I think are sInsertAfter and sInsertBefore. Any others?

    Re: Linked Lists

    Here is the code that I have so far, minus commenting. There are 7 methods listed below


    sInsertFront seems to crash Excel if more than about 4000 nodes are inserted. If you have a for next loop with variable i, that keeps using sInsertFront, how would you trap the i when excel crashes?

    Sometimes I will get "Out of Stack Space" error before the crash. What are the limits of the Stack Space? If Instead of one sList node with say 30,000 nodes, would 10 sList nodes of 3000 nodes each prevent the stack space error?

    Other than that the code seems to work ok. I actually used it in a different program and was suprised how well it worked, it was useful.



    sList Class

    Re: Linked Lists

    Thanks for pointing that out. I have a lot of GB's of RAM in this machine, I wonder how much memory could a million nodes take, or how much memory is typically allocated to an instance of Excel? I got the garbage collection reason from the video CS 61B on youtube, but that was for Java. For me the important thing was that you lose access to the rest of the linked list. How could error handling be set up for sInsertFront? I do not usually include error handling in my code.

    Also I see from the code that I was still having trouble with the concept of encapsulation when I posted it. The method sGetLastNode returns an sListNode which I now realize is not a good thing. I think it would have been helpful to clearly understand what the goal of the encapsulation was in the first place for this case - to prevent the user from having the ability to access any nodes at all in any way. As far as the user is concerned, they just want a list and some methods to manipulate the list. I think the method is supposed to be called sGetLastItem, not sGetLastNode, and it is supposed to return the "cargo" of the last sListNode, not the node itself.

    Re: Linked Lists

    I had some time to work on the Linked List project. Code below. I was stuck on the concept of encapsulation for quiet awhile. I would make the sList class and then try to pass an sListNode Object to one of the sList's methods as a parameter. That seemed to defeat the purpose of encapsulation, finally I figured out that I did not need to pass an sListNode Object as a parameter, but only the "cargo" of that obect and just let the sList class handling creating the sListNode Objects as needed. I still have more methods to write for this class but I think I should not have to much trouble from this point.

    The sList class. All the methods that work with sListNode Objects are in this class. 3 have been written so far.

    The sListNode Class

    The code below just tests some of the methods of the sList class

    Re: Linked Lists

    I had the first method of sList, sInsertFront, all written and diagrammed out. sInsertFront inserts a node into the front of an existing linked list. I tested it out for 10,100,1000 sInsertFront operations via a loop and it worked great. When I tried it for 1,000,000, excel crashed and I lost all my work. I will redo it next week and post.

    Present user with dialog box, user will select folder of interest in Outlook 2010 There are several different fields for a ..I think mailitem? Email address, First Name, Middle Name, Last Name Find a way to identify if a field constains an email address and only an email address. Use Regex? #1 For each mailitem If the email address field does contain an email address, then overwrite Firstname, Middle Name and Last name and put the email address in there. When done, The email address field, the first name, middle name and last name will all contain the same email address. If the email address filed does not contain an email address, check if the first name, middle name or last name contain an email address. If any of those fields do contain an email addresss, copy that email address to the email field and then have the first name, middle name and last name also show that email address If nont of the fields contain an email address, export all the fields to an excel worksheet for that mailitem. When the program is finished, the user can view on the worksheet all the fields that did not show an email address. #2 Present user with dialog box again to choose a folder in Outlook 2010. Then an inputbox to enter a Search Term. Present the user with a dialog tickbox where they can check the fields they want searched for an occurance of the Search Term. If the SearchTerm is found in a mailitem in any of the user selected fields, export that data to an excel worksheet. The header values would be the name of any applicable field (all possible, not just the user selected for the search). For example this should include email address, first name, last name, body of the email, subject line, etc..