Wednesday, 30 March 2016

Virtual Keys - Control/ Capture Keyborad and Mouse to complete your tasks

Sub Virtual_Keys()
' To run this example please open word and ensure the title of the word file is Document1 - Microsoft Word. If not please update the title in the below AppActivate code
' This example will type your Name in word document and would automatically populate save and send feature.
' Good examples for beginers
AppActivate "Document1 - Microsoft Word"
Application.Wait (Now + TimeValue("00:00:02"))
Application.SendKeys ("Hello" & " " & Application.UserName)
Application.SendKeys ("%{f}{d}") ' Virtual Keys % = ALT & FDA = Save and Send as attcahment
Application.SendKeys ("{a}")

End Sub

Auto Kill Files and then empty Folder after specified timeline

Sub Autokill_Files_Folders()
On Error Resume Next
Application.Wait (Now + TimeValue("00:00:05"))
Kill "D:\Users\Ramneeks\Desktop\Sample Folder\New folder\*" ' Deletes Files
Application.Wait (Now + TimeValue("00:00:01"))
RmDir "D:\Users\Ramneeks\Desktop\Sample Folder\New folder" ' Delete empty folder
End Sub

Auto Kill or Delete files within specified timeline

Sub autokill_Files()
On Error Resume Next  ' To skip any error
Application.Wait (Now + TimeValue("00:00:05")) ' Time can be changed
Kill "D:\Users\Ramneek sharma\Desktop\Sample Folder\*" ' Set the path as required
End Sub

Shell Commands to delete Internet Files

Shell "RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 4" ' Delete Temp internet Files
Shell "RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 16" ' Delete Froms Data
Shell "RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 32" ' Delete Password
Shell "RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 1" ' Delete History
Shell "RunDll32.exe InetCpl.cpl, ClearMyTracksByProcess 2" ' Delete Cookies

Thursday, 17 December 2015

Macro to interchange (+) positive to (-) negative and vice-versa

Sub change()

On Error Resume Next

 For Each cell In Range("E1:e20")

If Not cell.Value Like "-" & "*" Then

cell.Value = "-" & cell.Value


cell.Value = Abs(cell.Value)

End If

Next cell

End Sub

Friday, 27 November 2015

Sunday, 22 November 2015

NIIT has given this opportunity for all those who believe "Still lot more to Learn".

NIIT has given this opportunity for all those who believe "Still lot more to Learn".

Come Join and learn, get your expertise, get skilled and groom yourself with NIIT.

 - "I teach to learn" Learning never ends.