Close Notepad++ if it’s open. Using a different text editor (i.e. regular Notepad) edit shortcuts.xml file located in: Windows XP Path: C:Documents and SettingsUSERApplication DataNotepad++ Vista/Windows 7 Path: C:UsersUSERAppDataRoamingNotepad++ Find <UserDefinedCommands> section and add the following line: <Command name=”Wscript” Ctrl=”yes” Alt=”no” Shift=”no” Key=”13″>c:WINDOWSsystem32wscript.exe "$(FULL_CURRENT_PATH)"</Command> This will assign Ctrl+Enter shortcut to execute VBScript. Save and closeContinue reading “Run VBScript from Notepad++”
Category Archives: VBA
VBA LAST ROW / COLUMN WITH DATA
iLastRow = Worksheets(“Sheet1″).Cells(Rows.Count, iColumnToSearchIn).End(xlUp).Row iLastCol = Worksheets(“Sheet1″).Cells(iRowToSearchIn, Columns.Count).End(xlToLeft).Column
VBA SUBSTRING / MID
Use MID function to return a substring: Function specification: Mid( string, start, length) Dim TestString As String = “Mid Function Demo” ‘ Returns “Mid”. Dim FirstWord As String = Mid(TestString, 1, 3) ‘ Returns “Demo”.
VBA SEARCH IN STRING INSTR CASE INSENSITIVE
http://didenko.ca/blog/wp-content/plugins/syntax-highlighter-compress/scripts/shBrushVb.js InStr specification: Instr( [start], string, substring, [compare] ) MsgBox InStr(“Hi there”, “THERE”) ‘ will return 0, as “THERE” doesn’t match the case: ‘ use vbTextCompare to make the search case insensitive: MsgBox InStr(1, “Hi there”, “THERE”, vbTextCompare) ‘ will return 4