Is there a need to set Objects to Nothing

VB uses a so-called “reference counting” garbage collector. Basically, the moment a variable goes out of scope, the reference counter on the referenced object is decremented. When you assign the object reference to another variable, the reference counter is incremented. When the counter reaches zero, the object is ready for garbage collection. The object resources … Read more

Retrieve calendar items (Outlook API, WebDAV) displaying strange behaviour

Possible cause: Sort after setting IncludeRecurrences. Here is my code of a PowerShell module that retrieves Outlook items between two dates. And a little applet to check for changes and send an email including the agenda updates, which comes handy when you don’t have mobile access to the Exchange. Path: Documents\WindowsPowerShell\Modules\Outlook\expcal.ps1 Function Get-OutlookCalendar { <# … Read more

Excel column number from column name

I think you want this? Column Name to Column Number Sub Sample() ColName = “C” Debug.Print Range(ColName & 1).Column End Sub Edit: Also including the reverse of what you want Column Number to Column Name Sub Sample() ColNo = 3 Debug.Print Split(Cells(, ColNo).Address, “$”)(1) End Sub FOLLOW UP Like if i have salary field at … Read more

Test if string begins with a string?

There are several ways to do this: InStr You can use the InStr build-in function to test if a String contains a substring. InStr will either return the index of the first match, or 0. So you can test if a String begins with a substring by doing the following: If InStr(1, “Hello World”, “Hello … Read more

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