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 »

The value violated the integrity constraints for the column

If you happen to get an error “The value violated the integrity constraints for the column”, it means that it tried to insert null value into the non nullable column in the database. If the source is table or in any other easily verifiable format, you can visually look at it. If the source is… 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 R1C1 formula keeps coming back even when it is changed

If you have mix of spreadsheets some of which contains R1C1 formula and if you try to change the R1C1, it comes back in certain spreadsheets. It is extremely frustrating to fix this issue where it is not working as it supposed to work. Here is the solution.

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.