2010
04.21

When cleaning out my mail box, I often found myself sorting the emails by subject or conversation, then deleting each irrelevant conversation by selecting its common subject. This method is moderately fast, but not efficient. For 2 reasons:

  • You must always sort by subject/ conversation to delete the entire conversation
  • Your sorted emails become alphabetical which makes relevant conversations more prone to be deleted as you can’t recall the content of each thread just from its subject.
  • Typically I have my emails arranged by received date, so every time I’d like to delete any irrelevant conversation I’d need to sort by subject, find that conversation, delete it, go back to sort by received date, realize there are other conversations I’d like to delete, then go back to sort by subject…. it’s a very annoying repetitive task!

    This code, once installed, deletes the entire conversation in the current folder for each of the email in a selection. Since Outlook does not enable keyboard shortcuts for macro, it must be added as a command button on the toolbar.

    Read More >>

    • Share/Bookmark
    2010
    04.08

    Excel has various ways of allowing users to call macros, such as using the View Macros option (Alt + F8), or by assigning the macro to a button, or a short-cut key, or even through a righ-click any cell(s) and choosing the macro from the pop-up menu!

    In its simplest form, Orgrid has provided the barebone of creating a Right-Click option. In this post I will elaborate abit more on customizing such options, such as assigning separate macros for single versus multiple cell selections, adding icons to each option to create a more user-friendly interface, and even removing the default options of the pop-up menu!

    Read More >>

    • Share/Bookmark
    2010
    03.31

    When I first started with PHP and MySQL, I was just fascinated at how simple everything is! I quickly get caught up with doing more advanced queries, and from times to times I found myself forgetting the syntax of even the most common ones. This post is not meant to be a tutorial, but rather a general note of mySQL’s most basic queries:

    • SELECT query
    • INSERT query
    • UPDATE query
    • DELETE query
    • CONNECT function

    I find it useful to have around a quick summery of syntax and examples of the frequently used queries, to avoid those silly “beginner’s mistakes” and perhaps more time focusing on …pulling my hairs out for the main functions ;-)

    Read More >>

    • Share/Bookmark
    2010
    03.28

    Very often, we use the List Box control in VBA userform as a mean to let the user select single, or more frequently, multiple values from a list. The RowSource property is often set to be a certain column, or range within a column, set as choices for the list box, such as UserData!A1:A20. For displaying multiple columns, something like UserData!A1:C20 would suffice.

    But how about displaying only a few selected columns which are not consecutive in order?

    Read More >>

    • Share/Bookmark
    2010
    03.27

    Who would have thought VBA can control Internet Explorer (IE) eh? :-)

    Excel does have the option of importing a web query into a workbook, and that works fairly well if the page you’re getting the data from is static, aka having all data values actually embedded in the HTML page content. However, that option does not work when you’d like to extract data from dynamic web pages, which are generated by a web application and whose contents are often embedded in the scripting language, such as Java for example.

    In this post, I am going over the common techniques of summoning Internet Explorer (IE) from Excel. In doing so, we are essentially set IE as an Excel object, and thereby able to obtain and control its HTML elements, extracting hidden values which web import option could never touch (such as cache ID ;-) ), and even submitting web forms.

    Read More >>

    • Share/Bookmark
    2010
    03.27

    Just a quick summary of the COUNT functions’ differences, and the corresponding exmaples!

    Rules of thumb:

    COUNT= counts only numeric values
    COUNTA =counts all but blank cells
    COUNTBLANK= counts blanks only
    COUNTIF = counts by condition

    Read More >>

    • Share/Bookmark