28.12.16

How to convert a numeric value into English words in Excel

How to create the sample function Called SpellNumber

  1. Start Microsoft Excel.
  2. Press ALT+F11 to start the Visual Basic Editor.
  3. On the Insert menu, click Module.
  4. Type the following code into the module sheet.
    
    Option Explicit
    'Main Function
    Function SpellNumber(ByVal MyNumber)
        Dim Dollars, Cents, Temp
        Dim DecimalPlace, Count
        ReDim Place(9) As String
        Place(2) = " Thousand "
        Place(3) = " Million "
        Place(4) = " Billion "
        Place(5) = " Trillion "
        ' String representation of amount.
        MyNumber = Trim(Str(MyNumber))
        ' Position of decimal place 0 if none.
        DecimalPlace = InStr(MyNumber, ".")
        ' Convert cents and set MyNumber to dollar amount.
        If DecimalPlace > 0 Then
            Cents = GetTens(Left(Mid(MyNumber, DecimalPlace + 1) & _
                      "00", 2))
            MyNumber = Trim(Left(MyNumber, DecimalPlace - 1))
        End If
        Count = 1
        Do While MyNumber <> ""
            Temp = GetHundreds(Right(MyNumber, 3))
            If Temp <> "" Then Dollars = Temp & Place(Count) & Dollars
            If Len(MyNumber) > 3 Then
                MyNumber = Left(MyNumber, Len(MyNumber) - 3)
            Else
                MyNumber = ""
            End If
            Count = Count + 1
        Loop
        Select Case Dollars
            Case ""
                Dollars = "No Dollars"
            Case "One"
                Dollars = "One Dollar"
             Case Else
                Dollars = Dollars & " Dollars"
        End Select
        Select Case Cents
            Case ""
                Cents = " and No Cents"
            Case "One"
                Cents = " and One Cent"
                  Case Else
                Cents = " and " & Cents & " Cents"
        End Select
        SpellNumber = Dollars & Cents
    End Function
          
    ' Converts a number from 100-999 into text 
    Function GetHundreds(ByVal MyNumber)
        Dim Result As String
        If Val(MyNumber) = 0 Then Exit Function
        MyNumber = Right("000" & MyNumber, 3)
        ' Convert the hundreds place.
        If Mid(MyNumber, 1, 1) <> "0" Then
            Result = GetDigit(Mid(MyNumber, 1, 1)) & " Hundred "
        End If
        ' Convert the tens and ones place.
        If Mid(MyNumber, 2, 1) <> "0" Then
            Result = Result & GetTens(Mid(MyNumber, 2))
        Else
            Result = Result & GetDigit(Mid(MyNumber, 3))
        End If
        GetHundreds = Result
    End Function
          
    ' Converts a number from 10 to 99 into text. 
    Function GetTens(TensText)
        Dim Result As String
        Result = ""           ' Null out the temporary function value.
        If Val(Left(TensText, 1)) = 1 Then   ' If value between 10-19...
            Select Case Val(TensText)
                Case 10: Result = "Ten"
                Case 11: Result = "Eleven"
                Case 12: Result = "Twelve"
                Case 13: Result = "Thirteen"
                Case 14: Result = "Fourteen"
                Case 15: Result = "Fifteen"
                Case 16: Result = "Sixteen"
                Case 17: Result = "Seventeen"
                Case 18: Result = "Eighteen"
                Case 19: Result = "Nineteen"
                Case Else
            End Select
        Else                                 ' If value between 20-99...
            Select Case Val(Left(TensText, 1))
                Case 2: Result = "Twenty "
                Case 3: Result = "Thirty "
                Case 4: Result = "Forty "
                Case 5: Result = "Fifty "
                Case 6: Result = "Sixty "
                Case 7: Result = "Seventy "
                Case 8: Result = "Eighty "
                Case 9: Result = "Ninety "
                Case Else
            End Select
            Result = Result & GetDigit _
                (Right(TensText, 1))  ' Retrieve ones place.
        End If
        GetTens = Result
    End Function
         
    ' Converts a number from 1 to 9 into text. 
    Function GetDigit(Digit)
        Select Case Val(Digit)
            Case 1: GetDigit = "One"
            Case 2: GetDigit = "Two"
            Case 3: GetDigit = "Three"
            Case 4: GetDigit = "Four"
            Case 5: GetDigit = "Five"
            Case 6: GetDigit = "Six"
            Case 7: GetDigit = "Seven"
            Case 8: GetDigit = "Eight"
            Case 9: GetDigit = "Nine"
            Case Else: GetDigit = ""
        End Select
    End Function
         

21.12.16

Remove .lnk Virus activity

1. Login to the affected user.

2. Start - run - regedit 

3. Select the key, HKEY_CURRENT_USER\software\microsoft\windows\currentversion\explorer\fileexts\.lnk

 4. Delete the key "UserChoice"

5. Exit registry editor and restart the machine.


18.11.16

.xlsx file cannot open in excel 2010 by double clicking

I believe this to be registry related issue.

So, it should be possible to use Registry to fix it.
You could try using regedit.


1.Click on the "Start" button, and then click on "Run." In the dialog box that appears, type "regedit" into the text box, and then click the "OK" button.
2.Navigate to
           HKEY_CLASSES_ROOT\Applications\EXCEL.EXE\shell\open\command
3. change to Office14. 



Some times Its not solve the issue..

At that time Please try to remove the "%1" in the registry key and try..
Then change the default proramme of the .xlsx file to excel.
After that open regedit and add "%1" at the end again.

Then check and enjoy working....

4.10.16

Killer keyboard shortcuts to help you master Windows

 

Keyboard shortcuts for the Windows surfer

If you hope to master Windows keyboard shortcuts, you should start with the Windows desktop. The following shortcuts let you toggle between app windows and quickly resize them without having to reach for a mouse or align your apps.
  • Windows key (a.k.a., "Winkey") + D.  Minimize all app windows and jump straight to the desktop. Hit the shortcut again to bring all apps back to the foreground.
  • Winkey + Comma. Take a quick peek at your desktop, and then release the keys to snap all apps back to the foreground.
  • Winkey + Left Arrow, or Winkey + Right Arrow. Dock your app windows to the left or right of the screen.
  • Winkey + Down Arrow, or Winkey + Up Arrow. Maximize or minimize a selected app. Or dock your app windows to the top or bottom of your display, when app windows are already docked to the left or right.
  • F11 – Toggle an active window in and out of full screen mode.
  • Ctrl + Esc – Bring up your Start menu. (This is particularly helpful if you use a keyboard that doesn't have a Winkey.)

Windows keyboard shortcuts for the Kung Fu typer

These useful shortcuts help zoom the cursor around your page much quicker than if you use a mouse or trackpad.  
  • Ctrl + Right Arrow, or Ctrl + Left Arrow. Move the cursor one word to the right or left.
  • Ctrl + Down Arrow, or Ctrl + Up Arrow. Move the cursor to the start or end of the next or previous paragraph.
  • Ctrl + Z, or Ctrl + Y. Undo or redo almost any action, as long as the app supports the feature.

Windows keyboard shortcuts for virtual desktop Jujutsu

Long a staple feature in Linux and the Mac, Microsoft finally officially incorporated virtual desktops into its Windows 10 OS. The indispensable feature lets you create additional desktops to better manage multiple app windows.
  • Winkey + Ctrl + D, or Winkey + Ctrl + F4. Create or close a virtual desktop.
  • Winkey + Ctrl + Left Arrow, or Winkey + Ctrl + Right Arrow. Toggle through your virtual desktops.
  • Winkey + Tab. Display the "Task View" interface for an overview of all virtual desktops. You can use the Arrow keys to toggle through desktops if you also hit Tab when in this mode. Hit Enter to jump to a selected desktop.

Windows keyboard shortcuts for the browser ninja

You've probably used a web browser for as long as you've had a computer, but do you take full advantage of keyboard shortcuts for browser navigation? These browser shortcuts all work the in latest versions of Internet Explorer, Microsoft Edge, Mozilla Firefox and Google Chrome.
  • Alt + D. Put the cursor into the browser's address bar.
  • Ctrl + W, or Ctrl + T. Close or open a new browser tab.
  • Ctrl + Shift + T. Reopen the last browser tab you closed. (This comes in handy when if you hit Ctrl + W too quickly.)
  • Ctrl + Plus sign, or Ctrl + Minus sign. Zoom in and out on a web page. Reset the zoom level with Ctrl + 0.
  • Ctrl + Tab, or Ctrl + Shift + Tab. Toggle to the next browser tab from left to right, or from right to left.
  • Alt + Right Arrow, or Alt + Left Arrow. Browse forward or backward through recently visited websites. These shortcuts perform the same function as a browser's Forward and Back buttons.

Windows keyboard shortcuts for locking up and shutting down

This guide wouldn't be complete without some shortcuts that help you shut down your PC and then lock things up.
  • Winkey + L. Immediately lock your PC.
  • Ctrl + Shift + Esc. Open the Task Manager to monitor app or forcibly shut down frozen programs.
  • Alt + F4. Close an active app. Using this shortcut key when your desktop is at the forefront invokes the "Shut Down Windows" prompt.


Windows + Ctrl + D – Adds a virtual desktop  
Windows + Ctrl + F4 – Close the virtual desktop you're using
Windows + comma – Gets you a peek at the desktop that goes away when you release the keys
Windows + Shift + Left or Right arrow – Moves an app from one monitor to another
Windows + Ctrl + F – Search for PCs on a network

6.8.16

Activities Log in Exchange Server 2010

From Exchange shell..


get-messagetrackinglog -Sender "xyz@xyzcom.in" -Start "8/6/2016 1:00:00 PM" -End "8/6/2016 11:12:00 PM" | export-csv d:\csvexport.csv


From Exchange management console,

Toolbox -- Mail Flow Tools  -- Tracking Log Explorer

19.7.16

Use the Shell to export a user's primary mailbox to a .pst file in Exchange 2010

A mailbox export request is a process of exporting mailbox or archive data to a .pst file. You can create more than one mailbox export request per mailbox, and each request must have a unique name.

You can't use the Exchange Management Console (EMC) to create a mailbox export request. You must use the Exchange Management Shell.  

To export a mailbox or archive, you must first create a network shared folder. You need to grant read/write permission to the group Exchange Trusted Subsystem to the network share where you'll export or import mailboxes. If you don't grant this permission, you'll receive an error message stating that Exchange is unable to establish a connection to the target mailbox. 


New-MailboxExportRequest -Mailbox nimish -FilePath \\exsrv01\PSTFileShare\nimish_exp.pst
 
 

5.7.16

Setas default printer - Error in Windows 7


When we trying to set a printer as default, some times we get an error message.







To correct this error do the following steps...

1. Start
2. Run
3. Type "regedit"
4. select " current user\software\microsoft\windows NT\Current Version\windows
5. select properties
6. Apply Everyone - Full permission
7. restart the machine




24.6.16

Outlook's Restore Window button doesn't work?


Close Outlook then open the registry editor. Find and delete the values atHKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Office Explorer where xx is your version of Outlook. Delete Frame , and if you have one for Namespaces, delete it as well. When you restart Outlook, it will open at full screen. Resize the window as desired.
HKEY_CURRENT_USER\Software\Microsoft\Office\xx.0\Outlook\Office Explorer
REG_BINARY: Frame
REG_BINARY: Namespaces

22.6.16

Configure Outlook XP/2003/2007 to Prompt for a Password


In order to configure Outlook to always prompt you for your credentials before opening your mailbox perform the following steps:
  1. Start Outlook.
  2. From the Tools menu, select E-mail Accounts.
  3. Select the View or Change Existing E-mail Accounts option.
  4. Click Next.
  5. Select your Exchange server.
Note: If prompted, in the Password text box, type your password.

  1. Click the More Settings button.
  2. Set your network security level:
Place a check in the Always Prompt for User Name and Password check box.

18.4.16

The MS Excel's insert column option is disabled...


The following steps resolve the issue

1. Close all open Excel windows
2. In Windows Explorer, go to directory "%appdata%\Microsoft\Excel"
3. Rename the file:  Excel15.xlb --> Excel15.old

10.4.16

Exchange 2013/2010 mailbox backup by export to PST (PowerShell)



Single mailbox export to PST file

Exporting mailbox contents to a PST file is achieved using the MailboxExportRequest cmdlet. It has only 2 obligatory parameters: FilePath – defines the network share path of the PST file to which you want to export the data; and Mailbox – defines the Alias, SMTP address or Display name of the mailbox you will export.Requirements:
  • The user performing the export must be a member of a role group which has the Mailbox Import Export role added. The easiest way of achieving this is running this script:
    New-ManagementRoleAssignment -Role "Mailbox Import Export" -User "<user name or alias>"
  • The location to which you will export the PST file must be a shared folder.

Syntax

Here is an example of a mailbox export request, which backs up an entire mailbox to a PST file:
New-MailboxExportRequest -Mailbox <user> -FilePath \\<server FQDN>\<shared folder name>\<PST name>.pst




27.2.16

Viewing Current Mailbox Size, Message Count, and Last Logon - Exchange server

1. Open Exchange Management shell
2. Get-MailboxStatistics [-Server 'Server' | -Identity 'Identity' | -Database 'Database']

Here are some examples of using this cmdlet:
Get-MailboxStatistics -Server 'corpsvr127'
Get-MailboxStatistics -Database 'Corpsvr127\First Storage Group\Engineering'
Get-MailboxStatistics -Identity 'cpandl\williams'

6.1.16

Fortigate firewall- DHCP lease time settings

1. Click on CLI console to login to Fortigate firewall

2. MYFORTIGATE # config system dhcp server

3. MYFORTIGATE (server) # show
config system dhcp server
edit 1
set auto-configuration disable
set default-gateway 172.16.20.99
set domain "ARMORIQUE"
set interface "internal"
config ip-range
edit 1
set end-ip 172.16.20.15
set start-ip 172.16.20.11
next
end
set lease-time 86400
set netmask 255.255.0.0
set dns-server1 172.16.20.99
next
end

4. MYFORTIGATE (server) # edit 1

 
5. MYFORTIGATE (1) # set lease-time <integer>

                  ( 300 ~ 8640000 seconds (5 minutes ~ 100 days)
                    0 for unlimited lease time )

Fortigate firewall- How to clear DHCP lease manually

1. Log in to Fortigate unit using browser.
2. 

 
3. Click on CLI Console to login to Firewall.
4.  For IPv4: type,
                   execute dhcp lease-clear  <ip address>
For IPv6:type,
                    execute dhcp6 lease-clear <ip address>


To clear all,
                   execute dhcp lease-clear all