Tag Archives: VBA

Removing the password of an Excel VBA project

‘ to remove the password of a excel with .xlam extension ‘ 1. use the Savexlam2xls subroutine to save a copy of xlam file to xls file ‘ 2. run the moveprotect subroutine to remove the password of the xls … Continue reading

Share
Posted in Excel, VBA/ASP | Tagged , , , | Leave a comment

Add a worksheet function to extract hyperlinks

There is no worksheet function to extract hyperlink in a given cell. We can use VBA to create a function to do this. The simple function is listed here. Function getlink(rng) getlink = rng.Hyperlinks(1).Address End Function In your worksheet, you … Continue reading

Share
Posted in Excel, Tips, VBA/ASP | Tagged , , | Leave a comment

Dealing with Strings in VBA

Format string to a fixed length in VBA I was working on a project to write out a text file. All variables should be written out in a fixed length. Spaces will be used to fill empty before strings or … Continue reading

Share
Posted in Tips, VBA/ASP | Tagged , , , , | Leave a comment

A better VBA function to read CSV files

When you deal with a large number of CSV files, the best way to do it is develop an algorithm and automate the whole process. That will release you from the boring and error-prone process to do more productive work. … Continue reading

Share
Posted in VBA/ASP | Tagged , , , | Leave a comment

A skeleton of a MS Access VBA function operating data tables

Use Microsoft Access VBA can do all sorts of database operations. The following is the framework of a VBA subroutine. It includes all VBA database operation mechanisms. You can just borrow it and adapt it to your situation. Sub FillAField(tablename) … Continue reading

Share
Posted in Access, VBA/ASP | Tagged , , , | Leave a comment