Friday, April 15, 2011

Change Comment Shape or Add Image

Add a Picture to an Excel Comment

  1. Right-click the cell which contains the comment.
  2. Choose Show/Hide Comments, and clear any text from the comment.
  3. Click on the border of the comment, to select it.
  4. Choose Format|Comment
  5. On the Colors and Lines tab, click the drop-down arrow for Color.
  6. Click Fill Effects
  7. On the picture tab, click Select Picture
  8. Locate and select the picture
  9. To keep the picture in proportion, add a check mark to Lock Picture Aspect Ratio
  10. Click Insert, click OK, click OK



Change the Comment Shape 
For MS-Office 2000/XP/2003 only.

Add a bit of interest to a worksheet, by changing the comment shape from a rectangle.
  1. Right-click the cell which contains the comment.
  2. Choose Edit Comment
  3. Click on the border of the comment, to select it.
  4. On the Drawing toolbar, click the Draw button
  5. Choose Change AutoShape, and choose a category.
  6. Click on a shape to select it.
  7. When finished, click outside the comment.

For MS-Office 2007/2010.

In Excel 2007, the Drawing Tools  Format tab doesn’t appear on the Ribbon when you select a comment, so the Change Shape command isn’t available. It’s still possible to change the comment’s shape, but it takes a bit more effort.


You can add the Change Shape command to the Quick Access Toolbar (QAT):
  1. Right-click the QAT, and click Customize Quick Access Toolbar
  2. In the Choose commands from drop down list, click Drawing Tools | Format Tab
  3. In the list of commands, click Change Shape, and click Add.

Now you can change the Comment Shape

  1. Select the cell that contains the comment
  2. On the Ribbon, click the Review tab, and click Edit Comment
  3. Click the border of the comment, to select the shape.
  4. On the QAT. click Change Shape, and click on the shape that you want to use.

Copy/Move/Insert without cut and paste


How to do Copy/Move/Insert without Ctrl+C and Ctrl+V?

  • Select the range of cells to be copied, or moved, or inserted. 
  • Place the cursor on the heavy outline of this selected range, and the cursor changes into a 4-way arrow. 
  • Press and hold the left mouse button as you move the cursor to the location where you want to place the selected range. A gray outline around shows you the area to which the selected cells will be moved. 
  • Holding the Shift-key will move (i.e. cut and insert) the selected range without over-writing any cells in the paste location. 
  • Holding the Ctrl-key will create a copy of the selected range, leaving the original in place. 
  • Holding both Shift-key and Ctrl-key will insert a copy. 
This works on cells, rows, and columns (and sheets?) 
Try it... I think you'll like it. 

Thursday, March 10, 2011

PDF: Portable Document Format


What is PDF and how to use it?
PDF =  Portable Document Format
PDF is a standard to share document files. As compared to word , or wordpad
or any other office documents , PDF has many many more benifits. 
Use of PDF or Portable Document Format:


• Share files with others who don't have the same software
• Share files with others who use a different platform like Mac, Windows, Linux, etc.
• Share files that will look the same (layout, fonts) as on multiple systems
• Share files that can be protected from unauthorized viewing, printing, copying, or editing
• Publish electronic documents, ebooks, etc.
• Print files to many different types of printers, and all look essentially the same
• Create files with annotations, hyperlinks, and bookmarks that can be shared via email and on the Web
• Create interactive forms that can be shared via email and the Web
• Create files that are more efficient than PostScript or native file formats typically used in commercial printing

To View Pdf Files you need a PDF Reader , If you don't have a Pdf Reader you can download it from the linkhttp://www.adobe.com/products/reader.html

Friday, March 4, 2011

Replace text into your .txt file with VBA

FielPath : Location of your Text file including file name. e.g.: c:\abc\abc.txt
oldStr : search string into the file 
newStr: replace the value with oldStr.


Sub TestReplaceTextInFile(filePath As String, oldStr As String, newStr As String)
    ReplaceTextInFile filePath, oldStr, newStr
End Sub

Sub ReplaceTextInFile(SourceFile As String, sText As String, rText As String)
    Dim TargetFile As String, tLine As String, tString As String
    Dim p As Integer, i As Long, F1 As Integer, F2 As Integer
        TargetFile = "RESULT.TMP"
        If Dir(SourceFile) = "" Then Exit Sub
        If Dir(TargetFile) <> "" Then
            On Error Resume Next
            Kill TargetFile
            On Error GoTo 0
            If Dir(TargetFile) <> "" Then
                MsgBox TargetFile & _
                    " already open, close and delete / rename the file and try again.", _
                    vbCritical
                Exit Sub
            End If
        End If
        F1 = FreeFile
        Open SourceFile For Input As F1
        F2 = FreeFile
        Open TargetFile For Output As F2
        i = 1 ' line counter
        Application.StatusBar = "Reading data from " & _
            TargetFile & " ..."
        While Not EOF(F1)
            If i Mod 100 = 0 Then Application.StatusBar = _
                "Reading line #" & i & " in " & _
                TargetFile & " ..."
            Line Input #F1, tLine
            If sText <> "" Then
                ReplaceTextInString tLine, sText, rText
            End If
            Print #F2, tLine
            i = i + 1
        Wend
        Application.StatusBar = "Closing files ..."
        Close F1
        Close F2
        Kill SourceFile ' delete original file
        Name TargetFile As SourceFile ' rename temporary file
        Application.StatusBar = False
End Sub


Private Sub ReplaceTextInString(SourceString As String, _
        SearchString As String, ReplaceString As String)
    Dim p As Integer, NewString As String
        Do
            p = InStr(p + 1, UCase(SourceString), UCase(SearchString))
            If p > 0 Then ' replace SearchString with ReplaceString
                NewString = ""
                If p > 1 Then NewString = Mid(SourceString, 1, p - 1)
                NewString = NewString + ReplaceString
                NewString = NewString + Mid(SourceString, _
                    p + Len(SearchString), Len(SourceString))
                p = p + Len(ReplaceString) - 1
                SourceString = NewString
            End If
            If p >= Len(NewString) Then p = 0
        Loop Until p = 0
End Sub

Some funny JScripts


(1) Copy and paste the java script code to the address bar of your browser and Press Enter. Watch your window's "shaking it" !!!

javascript:a=0;x=0;y=0;setInterval("a+=.01;x=Math.cos(a*3)*200;
y=Math.sin(a*2)*2;moveBy(x,y)",2);void(0)



(2) Float the Body of your webpage.

javascript:R=0; x1=.1; y1=.05; x2=.25; y2=.24; x3=1.6; y3=.24; x4=300; y4=200; x5=300; y5=200; DI=document.getElementsByTagName("body");DIL=DI.length; function A(){for(i=0; i-DIL; i++){DIS=DI[ i ].style; DIS.position='absolute'; DIS.left=(Math.sin(R*x1+i*x2+x3)*x4+x5)+"px"; DIS.top=(Math.cos(R*y1+i*y2+y3)*y4+y5)+"px"}R++}setInterval('A()',5); void(0);


(3) Start Editing any web Page... and have some Fun !!!

javascript:document.body.contentEditable='true'; document.designMode='on'; void(0)

Thursday, February 3, 2011

Useful Shortcuts Keys in Windows OS


Windows Shortcuts



Run Commands:

compmgmt.msc - Computer management
devmgmt.msc - Device manager
diskmgmt.msc - Disk management
dfrg.msc - Disk defrag
eventvwr.msc - Event viewer
fsmgmt.msc - Shared folders
gpedit.msc - Group policies
lusrmgr.msc - Local users and groups
perfmon.msc - Performance monitor
rsop.msc - Resultant set of policies
secpol.msc - Local security settings
services.msc - Various Services
msconfig - System Configuration Utility
regedit - Registry Editor
msinfo32 _ System Information
sysedit _ System Edit
win.ini _ windows loading information(also system.ini)
winver _ Shows current version of windows
mailto: _ Opens default email client
command _ Opens command prompt

Run Commands to access the control panel:

Add/Remove Programs control appwiz.cpl
Date/Time Properties control timedate.cpl
Display Properties control desk.cpl
FindFast control findfast.cpl
Fonts Folder control fonts
Internet Properties control inetcpl.cpl
Keyboard Properties control main.cpl keyboard
Mouse Properties control main.cpl
Multimedia Properties control mmsys.cpl
Network Properties control netcpl.cpl
Password Properties control password.cpl
Printers Folder control printers
Sound Properties control mmsys.cpl sounds
System Properties control sysdm.cpl

Command Prompt:

ANSI.SYS Defines functions that change display graphics, control cursor movement, and reassign keys.
APPEND Causes MS-DOS to look in other directories when editing a file or running a command.
ARP Displays, adds, and removes arp information from network devices.
ASSIGN Assign a drive letter to an alternate letter.
ASSOC View the file associations.
AT Schedule a time to execute commands or programs.
ATMADM Lists connections and addresses seen by Windows ATM call manager.
ATTRIB Display and change file attributes.
BATCH Recovery console command that executes a series of commands in a file.
BOOTCFG Recovery console command that allows a user to view, modify, and rebuild the boot.ini
BREAK Enable / disable CTRL + C feature.
CACLS View and modify file ACL's.
CALL Calls a batch file from another batch file.
CD Changes directories.
CHCP Supplement the International keyboard and character set information.
CHDIR Changes directories.
CHKDSK Check the hard disk drive running FAT for errors.
CHKNTFS Check the hard disk drive running NTFS for errors.
CHOICE Specify a listing of multiple options within a batch file.
CLS Clears the screen.
CMD Opens the command interpreter.
COLOR Easily change the foreground and background color of the MS-DOS window.
COMP Compares files.
COMPACT Compresses and uncompress files.
CONTROL Open control panel icons from the MS-DOS prompt.
CONVERT Convert FAT to NTFS.
COPY Copy one or more files to an alternate location.
CTTY Change the computers input/output devices.
DATE View or change the systems date.
DEBUG Debug utility to create assembly programs to modify hardware settings.
DEFRAG Re-arrange the hard disk drive to help with loading programs.
DEL Deletes one or more files.
DELETE Recovery console command that deletes a file.
DELTREE Deletes one or more files and/or directories.
DIR List the contents of one or more directory.
DISABLE Recovery console command that disables Windows system services or drivers.
DISKCOMP Compare a disk with another disk.
DISKCOPY Copy the contents of one disk and place them on another disk.
DOSKEY Command to view and execute commands that have been run in the past.
DOSSHELL A GUI to help with early MS-DOS users.
DRIVPARM Enables overwrite of original device drivers.
ECHO Displays messages and enables and disables echo.
EDIT View and edit files.
EDLIN View and edit files.
EMM386 Load extended Memory Manager.
ENABLE Recovery console command to enable a disable service or driver.
ENDLOCAL Stops the localization of the environment changes enabled by the setlocal command.
ERASE Erase files from computer.
EXIT Exit from the command interpreter.
EXPAND Expand a M*cros*ft Windows file back to it's original format.
EXTRACT Extract files from the M*cros*ft Windows cabinets.
FASTHELP Displays a listing of MS-DOS commands and information about them.
FC Compare files.
FDISK Utility used to create partitions on the hard disk drive.
FIND Search for text within a file.
FINDSTR Searches for a string of text within a file.
FIXBOOT Writes a new boot sector.
FIXMBR Writes a new boot record to a disk drive.
FOR Boolean used in batch files.
FORMAT Command to erase and prepare a disk drive.
FTP Command to connect and operate on a FTP server.
FTYPE Displays or modifies file types used in file extension associations.
GOTO Moves a batch file to a specific label or location.
GRAFTABL Show extended characters in graphics mode.
HELP Display a listing of commands and brief explanation.
IF Allows for batch files to perform conditional processing.
IFSHLP.SYS 32-bit file manager.
IPCONFIG Network command to view network adapter settings and assigned values.
KEYB Change layout of keyboard.
LABEL Change the label of a disk drive.
LH Load a device driver in to high memory.
LISTSVC Recovery console command that displays the services and drivers.
LOADFIX Load a program above the first 64k.
LOADHIGH Load a device driver in to high memory.
LOCK Lock the hard disk drive.
LOGON Recovery console command to list installations and enable administrator login.
MAP Displays the device name of a drive.
MD Command to create a new directory.
MEM Display memory on system.
MKDIR Command to create a new directory.
MODE Modify the port or display settings.
MORE Display one page at a time.
MOVE Move one or more files from one directory to another directory.
MSAV Early M*cros*ft Virus scanner.
MSD Diagnostics utility.
MSCDEX Utility used to load and provide access to the CD-ROM.
NBTSTAT Displays protocol statistics and current TCP/IP connections using NBT
NET Update, fix, or view the network or network settings
NETSH Configure dynamic and static network information from MS-DOS.
NETSTAT Display the TCP/IP network protocol statistics and information.
NLSFUNC Load country specific information.
NSLOOKUP Look up an IP address of a domain or host on a network.
PATH View and modify the computers path location.
PATHPING View and locate locations of network latency.
PAUSE Command used in batch files to stop the processing of a command.
PING Test / send information to another network computer or network device.
POPD Changes to the directory or network path stored by the pushd command.
POWER Conserve power with computer portables.
PRINT Prints data to a printer port.
PROMPT View and change the MS-DOS prompt.
PUSHD Stores a directory or network path in memory so it can be returned to at any time.
QBASIC Open the QBasic.
RD Removes an empty directory.
REN Renames a file or directory.
RENAME Renames a file or directory.
RMDIR Removes an empty directory.
ROUTE View and configure windows network route tables.
RUNAS Enables a user to execute a program on another computer.
SCANDISK Run the scandisk utility.
SCANREG Scan registry and recover registry from errors.
SET Change one variable or string to another.
SETLOCAL Enables local environments to be changed without affecting anything else.
SETVER Change MS-DOS version to trick older MS-DOS programs.
SHARE Installs support for file sharing and locking capabilities.
SHIFT Changes the position of replaceable parameters in a batch program.
SHUTDOWN Shutdown the computer from the MS-DOS prompt.
SMARTDRV Create a disk cache in conventional memory or extended memory.
SORT Sorts the input and displays the output to the screen.
START Start a separate window in Windows from the MS-DOS prompt.
SUBST Substitute a folder on your computer for another drive letter.
SWITCHES Remove add functions from MS-DOS.
SYS Transfer system files to disk drive.
TELNET Telnet to another computer / device from the prompt.
TIME View or modify the system time.
TITLE Change the title of their MS-DOS window.
TRACERT Visually view a network packets route across a network.
TREE View a visual tree of the hard disk drive.
TYPE Display the contents of a file.
UNDELETE Undelete a file that has been deleted.
UNFORMAT Unformat a hard disk drive.
UNLOCK Unlock a disk drive.
VER Display the version information.
VERIFY Enables or disables the feature to determine if files have been written properly.
VOL Displays the volume information about the designated drive.
XCOPY Copy multiple files, directories, and/or drives from one location to another.
TRUENAME When placed before a file, will display the whole directory in which it exists
TASKKILL It allows you to kill those unneeded or locked up applications

Windows XP/VISTA/WINDOWS 7 Shortcuts:

ALT+- (ALT+hyphen) Displays the Multiple Document Interface (MDI) child window's System menu
ALT+ENTER View properties for the selected item
ALT+ESC Cycle through items in the order they were opened
ALT+F4 Close the active item, or quit the active program
ALT+SPACEBAR Display the System menu for the active window
ALT+TAB Switch between open items
ALT+Underlined letter Display the corresponding menu
BACKSPACE View the folder one level up in My Computer or Windows Explorer
CTRL+A Select all
CTRL+B Bold
CTRL+C Copy
CTRL+I Italics
CTRL+O Open an item
CTRL+U Underline
CTRL+V Paste
CTRL+X Cut
CTRL+Z Undo
CTRL+F4 Close the active document
CTRL while dragging Copy selected item
CTRL+SHIFT while dragging Create shortcut to selected iteM
CTRL+RIGHT ARROW Move the insertion point to the beginning of the next word
CTRL+LEFT ARROW Move the insertion point to the beginning of the previous word
CTRL+DOWN ARROW Move the insertion point to the beginning of the next paragraph
CTRL+UP ARROW Move the insertion point to the beginning of the previous paragraph
SHIFT+DELETE Delete selected item permanently without placing the item in the Recycle Bin
ESC Cancel the current task
F1 Displays Help
F2 Rename selected item
F3 Search for a file or folder
F4 Display the Address bar list in My Computer or Windows Explorer
F5 Refresh the active window
F6 Cycle through screen elements in a window or on the desktop
F10 Activate the menu bar in the active program
SHIFT+F10 Display the shortcut menu for the selected item
CTRL+ESC Display the Start menu
SHIFT+CTRL+ESC Launches Task Manager
SHIFT when you insert a CD Prevent the CD from automatically playing
WIN Display or hide the Start menu
WIN+BREAK Display the System Properties dialog box
WIN+D Minimizes all Windows and shows the Desktop
WIN+E Open Windows Explorer
WIN+F Search for a file or folder
WIN+F+CTRL Search for computers
WIN+L Locks the desktop
WIN+M Minimize or restore all windows
WIN+R Open the Run dialog box
WIN+TAB Switch between open items

Windows Explorer Shortcuts:

ALT+SPACEBAR - Display the current window’s system menu
SHIFT+F10 - Display the item's context menu
CTRL+ESC - Display the Start menu
ALT+TAB - Switch to the window you last used
ALT+F4 - Close the current window or quit
CTRL+A - Select all items
CTRL+X - Cut selected item(s)
CTRL+C - Copy selected item(s)
CTRL+V - Paste item(s)
CTRL+Z - Undo last action
CTRL+(+) - Automatically resize the columns in the right hand pane
TAB - Move forward through options
ALT+RIGHT ARROW - Move forward to a previous view
ALT+LEFT ARROW - Move backward to a previous view
SHIFT+DELETE - Delete an item immediately
BACKSPACE - View the folder one level up
ALT+ENTER - View an item’s properties
F10 - Activate the menu bar in programs
F6 - Switch between left and right panes
F5 - Refresh window contents
F3 - Display Find application
F2 - Rename selected item

Internet Explorer Shortcuts:

CTRL+A - Select all items on the current page
CTRL+D - Add the current page to your Favorites
CTRL+E - Open the Search bar
CTRL+F - Find on this page
CTRL+H - Open the History bar
CTRL+I - Open the Favorites bar
CTRL+N - Open a new window
CTRL+O - Go to a new location
CTRL+P - Print the current page or active frame
CTRL+S - Save the current page
CTRL+W - Close current browser window
CTRL+ENTER - Adds the http://www.(url).com
SHIFT+CLICK - Open link in new window
BACKSPACE - Go to the previous page
ALT+HOME - Go to your Home page
HOME - Move to the beginning of a document
TAB - Move forward through items on a page
END - Move to the end of a document
ESC - Stop downloading a page
F11 - Toggle full-screen view
F5 - Refresh the current page
F4 - Display list of typed addresses
F6 - Change Address bar and page focus
ALT+RIGHT ARROW - Go to the next page
SHIFT+CTRL+TAB - Move back between frames
SHIFT+F10 - Display a shortcut menu for a link
SHIFT+TAB - Move back through the items on a page
CTRL+TAB - Move forward between frames
CTRL+C - Copy selected items to the clipboard
CTRL+V - Insert contents of the clipboard
ENTER - Activate a selected link
HOME - Move to the beginning of a document
END - Move to the end of a document
F1 - Display Internet Explorer Help