Logon script – Adding a shortcut to the desktop

DIM oShell
DIM oShellLink

    set oShell = CreateObject("WScript.Shell")
    set oShellLink = oShell.CreateShortcut(oShell.SpecialFolders("Desktop") & "\Filename.lnk")
      oShellLink.TargetPath = "https://yourwebsitehere.com"
      oShellLink.IconLocation = "%SystemRoot%\system32\SHELL32.dll,86" 'Favourites icon
      oShellLink.Description = "Website Name Here"
    oShellLink.Save

Microsoft Excel – Macros – Import performance improvements

When importing a comma separated tet file (CSV) or tab separated text file using a macro, you can significantly improve performance by adding a few lines of code.

At the start of your import routine add the following lines:

Application.Calculation = xlCalculationManual
Application.ScreenUpdating = False
Application.DisplayStatusBar = False

At the end of your import routine add the following lines:

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True
Application.DisplayStatusBar = True

By stopping Excel from checking if any cell formulas need recalculating when a record is imported combined with disabling screen refresh/redraw combined with updating the status bar, the import routine performance can be improved significantly with little to no effort.

Files and folders not visible

Problem

My computer was affected by a virus even though the virus scanner is up-to-date.  Now I can’t see any of my files and folders.

Cause

Changing the properties of files and folders to label them as ‘read-only’ files and folders and ‘system’ files and folders is an action a user is allowed to perform.  A malicious program (virus) can easily attempt to perform this operation.  Most users will have a setting ticked to not show system files and folders.  The effect of this action is that all files and folders appear to have been deleted.  This is not the case.

Solution

To label your files and folders as ‘regular’ files and folders you can use the following commands:

[Win]+[R]
cmd
c:
cd \
attrib * -s -h -r /s /d

Windows Explorer – Menu not visible

To display the Menu in Windows Explorer, use the following instructions:

Organize > Layout > tick "Menu Bar"

or

Folder Options > View tab > tick "Always show menus"