Internet Explorer MS Excel MS Access MS VB/VBA MySQL JavaScript Windows Registry
sample contents

Switch off Auto-Complete

SUMMARY: Tired of IE6's Auto Complete mode where it tries to finish typing in web addresses and passwords for you?
  
 Normally, IE6 attempts to automatically type in web addresses after you begin typing in a few characters. Depending on your setup, IE6 may also try to automatically complete forms and passwords for you as well. While this may seem useful at times, in other instances this automatic completion can be downright annoying.
 
 To turn this feature off, click the "Tools" menu and select "Internet Options". From the multi-tabbed dialog box that follows, select the "Content" tab. Click the "AutoComplete" button. An "AutoComplete Settings" dialog box appears. Now, check or uncheck the options you would like. For example, to stop IE6 from automatically entering in web addresses, uncheck the "Web addresses" checkbox.
 
 Press "OK" to close this dialog box, then "OK" to close the "Internet Options" dialog box.
 


Change Text size quickly

SUMMARY: Change the font size of text inside webpages when using Internet Explorer 6.
  
 If you have a wheel mouse, you can use it to quickly increase or decrease the size of text. Just hold down the CONTROL key and scroll the wheel up to increase text size. Hold down the CONTROL key and scroll the wheel down to decrease text size.  


Remove Right-click items

SUMMARY: Remove right-click menu items from Microsoft Internet Explorer 6 that some third-party software programs add.
  
 When you right-click on a web page in Microsoft Internet Explorer 6, options normally appear such as "Back", "Forward", "View Source", etc. However, depending on software you have installed (sometimes unwittingly), other options may appear when you open this menu. If you are seeing items in the right-click menu that you want to remove, you can try this trick.
 
 (WARNING! This tip involves modifying the Registry. Mistakes can cause Windows or applications to stop functioning normally. Use at your own risk.)
 
 1. From the "Start" menu, select "Run", then type in "Regedit" and press "OK".
 2. In the Registry, navigate to the following section: HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\MenuExt.
 3. Now, underneath this key you may find folders representing menu items you want to remove. To remove the menu items, just click on the keys and choose "Delete".
 
 Note that this tip will only remove menu items installed by software. You cannot remove menu items such as "View Source" or "Print" using this tip.
 


Quick Launch a web page

SUMMARY: Access your most important or favourite web pages quicker.   On some versions of Windows, you have a QuickLaunch bar next to the area of the taskbar that shows the currently running programs.

This is useful because when programs are here, you can launch them more quickly than by navigating through the "Start" menu, hence the name "QuickLaunch".

If you have a webpage or a couple of webpages that you visit often, you can place shortcuts to these webpages on the QuickLaunch bar.
Just visit a webpage, then click and drag the icon on the top-left part of the Internet Explorer window to your QuickLaunch bar.

If you don't like the web page's icon in the QuickLaunch bar, just right-click on the icon and choose "Properties".

On the multi-tabbed dialog box that follows, click "Web Document".

Then, click the "Change Icon" button. You can choose from the various icons provided, or click the "Browse" button and search your system for more icons.

Most DLL and EXE files contain an icon or two, or you can type "%SystemRoot%\system32\SHELL32.dll" (without quotes) in the "File name" box for a number of icons. 

Adjust Excel 2003's Macro Security Level

SUMMARY: Help protect your computer by disabling potentially damaging Excel 2003 macros.  

Microsoft Excel 2003 spreadsheets can contain macros, or scripts, to perform various automated functions.

While many macros are useful and harmless, some malicious macros, called macro viruses, can destroy data or otherwise damage your machine.

For this reason, many people decide to disable macros altogether or turn security up so that macros can only be run from documents written by trusted publishers.

However, turning up the security may disable legitimate macros, so changing the security level is a personal decision. You may also want to change this setting before you open documents from different sources.

1. Click "Tools" - "Options".
2. When the "Options" multi-tabbed dialog box appears, click the "Security" tab.
3. Click "Macro Security".
4. When the "Security" multi-tabbed dialog box appears, select the "Security level" tab.
5. Here, you can decide the macro security level.
* "Low" is definitely not recommended unless you have virus scanners and are 100% certain of a document's authenticity.
* "Medium" lets macros run, but if Excel 2003 determines them to possibly have unsafe code, you will be prompted. Note that Excel 2003 may not always detect unsafe code.
* "High" only lets macros from trusted sources run. You can click the "Trusted Publishers" tab to view the list of such sources.
* "Very High" only lets macros run from trusted locations and from trusted sources.

To add a macro publisher to the "Trusted" list, set the macro protection to "Medium" or "High". Load a file containing macros you wish to run. You will then be prompted to add the publisher to the trusted list. Note that macros must be digitally signed by a publisher or this option will not appear.

No matter what you choose, you should still run and keep updated a virus scanner that supports the detection and cleaning of macro viruses. 


Remove Personal Information

SUMMARY: Delete personal information that may be saved along with your Excel 2003 spreadsheets.
 
By clicking "File" - "Properties" in a Microsoft Excel 2003 spreadsheet, various personal information about the currently open file can be viewed, such as the document's author, company, and when the document was created and last accessed. If entered, other information may be visible such as the document's title, subject, manager, comments, and more.

While this information may be beneficial to keep for your own use, if you distribute the spreadsheet to others, you might not want them to have access to this information. If desired, you can have Excel 2003 remove this information whenever you resave the document.

1. Click "Tools" - "Options".
2. When the "Options" multi-tabbed dialog box appears, click the "General" tab.
3. Check "Remove personal information from file properties on save".
4. Click "OK" to close the dialog box.
5. Resave the current document - "File" - "Save".
6. Check "File" - "Properties" to ensure the information was removed.
 


Password Protect a workbook

SUMMARY: Help protect a Microsoft Excel 2003 from accidental reading or modification.
 
To help prevent unauthorized access, you can password protect a spreadsheet (workbook file) so that only certain people can read the information. You can also go one step further and password-protect the workbook against modifications, so that you can give some people read-only access to a workbook and others (maybe just yourself) read-write access.

Before protecting your workbooks, a couple of notes:

1. Before password-protecting a workbook, you may wish to consider creating a backup copy of the workbook that is not password-protected. That way, if you lose the password, it will be easier to recover the information.

2. Microsoft Excel supports several types of encryption settings, including Microsoft RSA SChannel with variable key lengths, Microsoft Enhanced RSA and AES, Microsoft Base DSS and Diffie-Hellman, and more. However, password protecting and encrypting a document does not 100% guarantee that the document cannot be unencrypted or the password hacked.

To password-protect the currently-open workbook:

1. Click "Tools" - "Options".

2. When the "Options" multi-tabbed dialog box appears, click the "Security" tab.

3. Next to "Password to open" enter the required password to open the current workbook. If you do not enter a password in the "Password to modify" section below, if someone enters the password they can read and modify the file. If you do enter a password in the "Password to modify" section below, entering this password only provides the user read-access to the workbook.

4. Click the "Advanced" button if you wish to change the encryption type.

5. To differentiate between a read-only and a read-write access level, enter a password next to "Password to modify". Now, if someone wants to modify a document, they must enter both passwords.

6. If desired, click "Read-only recommended". This will cause Excel 2003 to recommend, upon opening the document, that it should be opened in read-only mode.

7. Click "OK" to close the dialog boxes.

8. Resave the spreadsheet to apply your changes.

View Webpages in Access

Ever need to view a webpage in Microsoft Access?

Don't bother opening up Internet Explorer or Netscape - Access will do it for you.

If you don't see a web bar in Access, click on the "View" menu, selecting "Toolbars."

Now, check "Web."

An Internet toolbar will appear. Just type in the name of your desired website and press enter - Access will load your default web browser to visit that site. 


Troubleshoot Non-Updating Database Access via OLE, DDE, ODBC

If you are having trouble with a Microsoft Access database not being modified, accessed, or refreshed correctly via OLE, DDE, ODBC, you may be able to solve the problems by changing retry counts, refresh intervals, or update intervals.

Click on the "Tools" menu, choosing "Options".

On the "Options" multi-tabbed dialog box that appears select the "Advanced" tab.

You may now modify options such as "OLE/DDE Timeout", "ODBC Refresh Interval", "Enable DDE Refresh", and "Update Retry Interval".

If you do not know what a particular option does, click on the "?" on the upper-right corner of the dialog box and then on the checkbox or text entry box in question.


Change Datasheet Display Defaults

If you are constantly changing the view properties of datasheets (such as the fonts and colors), you can modify the default display settings given to new datasheets.

Click on the "Tools" menu, selecting "Options."

On the multi-tabbed "Options" dialog box that appears click the "Datasheet" tab. You can now modify the default datasheet fonts, colors, gridline views, column widths, and more. 


Quickly Enter Date and Time

You can quickly insert the date and time when entering data into a database's fields.

Press and hold the CONTROL key and tap the semicolon (;) to insert the current date.

Press and hold the CONTROL and SHIFT keys and tap the semicolon key to make a colon (:) to insert the current time.

Note that once you enter a date or time into a field, the information does not automatically change whenever the actual date or time changes.

How to create a
self-signed certificate

Problem: When a certificate is created by using selfcert.exe,
it's private key cannot be exported.

"the associated private key is marked as not exportable".

Solution version 1: Use makecert.exe with the "-pe" option to create
and store the certificate with an exportable private key:

makecert -r -pe -n "CN=Your Name" -b 01/01/2000 -e 01/01/2099
-eku 1.3.6.1.5.5.7.3.3 -ss My

Then you can export the certificate from the certificate store,
including the private key.


Get User Name

Use VBA to get the user's network login name

Option Explicit
' This is used by GetUserName() to find the current user's
' name from the API
Declare Function Get_User_Name Lib "advapi32.dll" Alias _
                 "GetUserNameA" (ByVal lpBuffer As String, _
                 nSize As Long) As Long
Function GetUserName() As String
    Dim lpBuff As String * 25
 
    Get_User_Name lpBuff, 25
    GetUserName = Left(lpBuff, InStr(lpBuff, Chr(0)) - 1)
End Function


Check whether the specified path exists

Function DirExists(ByVal strDirName As String) As Boolean
   
    On Error Resume Next

    DirExists = (GetAttr(strDirName) And vbDirectory) = vbDirectory

    Err.Clear
End Function


Find the temporary file path used by Windows

Option Explicit

Private Declare Function GetTempPath Lib "kernel32" Alias "GetTempPathA" _
                (ByVal nBufferLength As Long, _
                ByVal lpBuffer As String) As Long
Public Function GetTempDir() As String
    Dim sBuffer As String
    Dim lRetVal As Long

    sBuffer = String(255, vbNullChar)

    lRetVal = GetTempPath(Len(sBuffer), sBuffer)

    If lRetVal Then
        GetTempDir = Left$(sBuffer, lRetVal)
    End If
End Function

Hyperlink on Outlook forms

Believe it or not, a label control on an Outlook form supports a Click event. So, you can put the text for the hyperlink in the control's caption and use code like this (adapted for your page and control name, of course) to launch the link in the browser when the user clicks the label.

You could, of course, also use a CommandButton control or store the URL somewhere other than the control's caption or even generate it programmatically.

Sub Label1_Click()
    Set objWeb = CreateObject("InternetExplorer.Application")
    objWeb.Navigate Item.GetInspector.ModifiedFormPages _
      ("P.2").Controls("Label1").Caption
    objWeb.Visible = True
End Sub

Convert current date to MySQL format

The date format for a MySQL database is YYYY-MM-DD (eg - 2003-12-31).

For example, to display the current date to this format using PHP, use:
<?php
echo 'Today's date in MySQL format is '.date('Y-m-d', mktime());
?>


Use smallest datatype

When creating a new column in your database table, use the smallest datatype that will hold the information you expect to store.

Most of the time, using INT is overkill as MEDIUMINT, SMALLINT, or TINYINT have enough range.

Using a smaller datatype saves space and speeds things up.


Declaring your columns NOT NULL

Declare all of your columns NOT NULL unless you specifically need to store NULL values.

Note - NULL is not the same as 0 or the empty string.

NOT NULL saves space and speeds things up.


Format your dates in your SQL

You don't have to use PHP or ASP to format dates you pull from a database.

You can format them 'on the fly' in your SQL query using the DATE_FORMAT function.

For example, if your column name is ArticleDate, your query could take the form:
SELECT DATE_FORMAT(articledate,'%a %e %b') as artdate FROM Tablename
The terms %a, %e and %b translate to the abbreviated day of the week (eg - Wed), the date of the month (1 to 31), and the abbreviated month (eg - Dec). Eg - the final result: "Wed 25 Dec". You can display different dates using different terms - see a full list in the MySQL Manual

JavaScript Calculator

If you're using a JavaScript enabled version of Netscape Navigator,
you can use it instead of your calculator to perform even very complex calculations.

No, you don't have to visit a web site with an online calculator to do this. All you have to do is:

  • Press CTRL+L or go to the "Location" input box
  • Type javascript:eval( <your formula> ) and press ENTER

    For example, to add 1 and 3 type:

    javascript:eval( 1 + 3 )

    and press ENTER


Describe your links

As you point to links on a web page, most browsers will display the address which that link points to on the status bar.
Boring? Well, why not add some spice to your pages by describing your links?

All you have to do is add "OnMouseOver" tag (or event) to your anchor in the following format:

OnMouseOver = "window.status='description'; return true;"

For example, if your original anchor tag looks like:

<A href="/home.html">

change it to:

<A href="/home.html" OnMouseOver="window.status='Go to my home page...'; return true;">


Cross-Platform document scroll area

Below are methods for returning the scroll area width and height, that work on all browsers.

function getScrollWidth()
{
   var w = window.pageXOffset ||
           document.body.scrollLeft ||
           document.documentElement.scrollLeft;
           
   return w ? w : 0;
}

function getScrollHeight()
{
   var h = window.pageYOffset ||
           document.body.scrollTop ||
           document.documentElement.scrollTop;
           
   return h ? h : 0;
}


Obtaining the domain name

function writeDomain()
{
   var myDomain = document.domain;

   document.write(myDomain);
}
 

Automatic Screen Refresh

Warning - Do not change anything in your registry before first backing up.
When you make changes to your hard drive and use Explorer, the changes are not usually displayed until you press the F5 key
to make the updates automatic:

  1. Start Regedit

  2. Go to HKEY_LOCAL_MACHINE / System / CurrentControlSet / Control / UpdateMode

  3. Edit the DWORD value to be between 1 and 7

  4. Restart Windows

 


Changing the registered owner

  1. Starting Regedit

  2. Go to HKEY_LOCAL_MACHINE / SOFTWARE / Microsoft / Windows / CurrentVersion

  3. From there you can edit the name in the Registered Owner key

 


Creating a legal text notice

You can create a banner that will come up just before you logon to the computer:

  1. Start Regedit

  2. Go to HKeyLocalMachine \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Win Logon

  3. Create a new string value called LegalNoticeCaption and give it a value you want to see in the menu bar

  4. Create a new string value called LegalNoticeText and give it a value you want to see in the dialog box

Now before anyone logs into that computer, this banner will come up on the screen.
This can be useful for any legal warnings you want to give regarding the use of the computer.

 


Modifying default desktop icons

  1. Start Regedit

  2. Go to HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ explorer \ Shell Icons

  3. The default icons are numbered in the right panel from 0-40

  4. Double click on the number of the particular icon you want to change. See the chart below.

  5. Enter the name of the icon file you want to use followed by the number of the icon in that file.
    Note: The numbering starts with zero.

  6. If you use a single .ICO file, it should be followed by a 0.

  7. e.g. - filename.dll,4 - This would actually be the 5th icon since it starts with 0.

  8. Make sure you delete the hidden file C:\WINDOWS\SHELLICONCACHE


Preventing change to the Start menu

 

To prevent any changes to the Start Menu, even a right click:

  1. Start Regedit

  2. Go to HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Policies \ Explorer

  3. Add a DWORD called NoChangeStartMenu

  4. Give it a value of 1

[an error occurred while processing this directive] [an error occurred while processing this directive]