Category Archives: MS Excel

Excel keyboard shortcut for grouping sheets

Ctrl + Shift + Page Down will group two consecutive sheets (and accidentally cause a problem in VBA) Vishal Monpara Vishal Monpara is a full stack Solution Developer/Architect with 12 years of experience primarily using Microsoft stack. He is currently working in Retail industry and moving 1’s and 0’s from geographically dispersed hard disks to… Read More »

Range.Sort throws an error even though cells are not merged

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 »

Export Outlook From, To, Subject, Receive Date and other meta data into Excel

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 »

Resolved: Method ‘Sheets’ of object ‘_Global’ failed

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 »

Restore missing button and drop down controls in Excel

Have you ever faced a situation where suddenly all the buttons, drop downs and various controls are missing from your Excel spreadsheet? Well, it’s not gone but it is hidden. Here is the setting to make the controls visible. Go to File > Options > Advanced > Display options for this workbook > For objects,… Read More »

How to replace VBA code from Excel/Word

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 »

Excel VBA – Frequently used code snippets

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. Vishal Monpara Vishal Monpara is a full stack Solution Developer/Architect with 12 years of experience primarily using… Read More »