VBA hash string

Maybe others will find this useful. I have collected some different functions to generate a short hash of a string in VBA. I don’t take credit for the code and all sources are referenced. CRC16 Function: =CRC16HASH(A1) with this Code hash is a 4 characters long HEX string 19 code lines 4 digits long hash … Read more

How can I create text files with special characters in their filenames

Value retrieved from the cell is already in Unicode. StrConv(vbUnicode) gives you “double unicode” which is broken because it went through a conversion using the current system codepage. Then the Print command converts it back to “single unicode”, again using the current system codepage. Don’t do this. You’re not saving unicode, you’re saving invalid something … Read more

Consolidating worksheets into one

Kindly use RDBMerge add-in which will combine the data from different worksheet and create a master sheet for you. Please see the below link for more details. http://duggisjobstechnicalstuff.blogspot.in/2013/03/how-to-merge-all-excel-worksheets-with.html Download RDBMerge

Workbooks.Open Method in VBA

Filename is relative to the current Excel directory (which is different from the directory in which an opened document is). You change the current directory by using ChDir “x:\new\path”. But what you actually want to do is: Workbooks.Open Filename:=EnsureSlash(ThisWorkbook.Path) & “myTest.xls”, ReadOnly:=True , where EnsureSlash is your custom function that appends a backslash (\) to … Read more