Recently, we encountered an issue in our production environment where so-far-nicely-working complex spreadsheet threw an exception on Range.Sort. The error description was “to do this all merged cells should be of same size”. Unfortunately there was no merged cell and Excel was still complaining about merged cell. Finally I figured out that the range contained… Read More »
I had a need to export all the emails’ meta data like From, To, Subject, Receive Date from Outlook. Quickly searching on the internet, I found the script at http://superuser.com/questions/816289/exporting-attachment-file-name-email-metadata-from-outlook-to-excel so I quickly created a spreadsheet and exported all the needed information. I have made following modification to the code Commented out exporting email body… Read More »
We have a complex macro enabled spreadsheet. Today we got a ticket from the business user that Excel is throwing error “Method ‘Sheets’ of object ‘_Global’ failed.”. I searched online but could not find the straight forward answer. None of the online discussion was giving the root cause of the error and everyone was discussing… Read More »
As Microsoft got rid of “Record Macro” button from PowerPoint 2013, it is extremely difficult to write a macro for PowerPoint which does what we want to do. Recently, I had a need for having an animation with custom path for a shape. I tried all possible solutions available on the internet and could not… Read More »
Have you ever had a situation where you wanted to replace the existing VBA code from Excel/Word and did not want to open up each file and change it? Well, remember that Excel and Word files are nothing but a zip file. You can easily create a program to replace the file from “zip” file.… Read More »
If you happen to occasionally work on Excel VBA, you would forget various functions and for a small but advanced VBA, you would have to use Google for each line of code. Here is all at one place.
If you want to get HTML editor within MS Access form, there are couple of solutions available. The free solution I know is to get Not So Elegant HTML Editor. The problem with this editor is that After looking at this editor, you will never say “so cool” It is good for basic editing but… Read More »
Here is a code to change MS Access application title and icon using VBA. This code also sets the application icon as form and report default icon. Click here for list of all properties exposed by CurrentDB.Properties().
Description: I was executing a stored proc which would halt its execution using RAISERROR. When I tried to run the stored proc in Query Analyzer it worked fine and gave me error but in VBA it couldn’t halt the execution and continued to the next statement.