Category: VBA macros

Macros in Excel for beginners, VBA excel examples, Excel VBA programming, VBA macros and tutorials

VBA macro to extract string between two delimiters in a text file

extract-string-between-two-delimiters-example-file

Excel VBA macro to extract string between two delimiters in a text file. This macro extracts string between two delimiters within a string even it contains multiple delimiters. VBA code: Sub extractStringBetTwoDels() inputFile = Application.GetOpenFilename() Open inputFile For Input As #1 ‘Opening the file to read its data Line Input #1, textline ‘reading the first text line firstDelPos = InStr(textline, “[“) ‘ position of start delimiter secondDelPos = InStr(textline, […]

VBA macro for auto outlook email encryption

VBA macro to perform auto outlook email encryption based on user input while sending an outlook mail. This macro runs in the background when user clicks on send button. What this macro does? 1. Checks whether the outlook mail is already encrypted manually by the sender 2. If the mail is already encrypted, then this macro […]