Range.Replace is always true for Chr(1)

The reason can be inferred from the difference between NUL : No character. It is used for filling in time or filling space on the surface (such as surface of platter) of storage device where there are no data. We’ll use this character when we’ll be doing programming for data wipers (destructive and non-destructive both) … Read more

Get CSV Data from Clipboard (pasted from Excel) that contains accented characters

Excel stores the string on the clipboard using the Unicode character encoding. The reason you get a square when you try to read the string in ANSI is that there is no representation for that character in your system’s ANSI codepage. You should just use Unicode. If you’re going to be dealing with localization issues, … Read more

VBA takes wrong branch at If-statement – severe compiler bug?

This bug is not present on 32-bit, but it seems to be present in 64-bit VBA-capable applications (I’ve tried Excel, Word, and AutoCAD). Since the question already covers what happens if the Object does not get terminated or if there is no Class_Terminate event, the following examples all use an Object that will surely go … Read more

Excel dropdown with name/value pairs

Simple! Here is what we are going to get! 3 Steps Only: Define a range to use as the lookup value Create the dropdown list Paste in some code Step 1: Setup Sheet2 like this and define a Named Range as _descrLookup: ( Highlight -> Right-Click -> “Define Name…” ) This is an optional step, … Read more

What exactly is the function of Application.CutCopyMode property in Excel

By referring this(http://www.excelforum.com/excel-programming-vba-macros/867665-application-cutcopymode-false.html) link the answer is as below: Application.CutCopyMode=False is seen in macro recorder-generated code when you do a copy/cut cells and paste . The macro recorder does the copy/cut and paste in separate statements and uses the clipboard as an intermediate buffer. I think Application.CutCopyMode = False clears the clipboard. Without that line … Read more

Excel Date column returning INT using EPPlus

…when I need to read that excel file, the only dates that are incorrect are the ones the user has changed So when you read the modified excel-sheet, the modified dates are numbers whereas the unchanged values are strings in your date-format? You could get the DateTime via DateTime.FromOADate: long dateNum = long.Parse(worksheet.Cells[row, column].Value.ToString()); DateTime … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)