VBA LESSON 119 - INSTR function and MID function for strings

Опубликовано: 04 Июнь 2026
на канале: MS / Access
1,536
1

englishspacedog YouTube tutorial from Canada

http://www.herostratus.ca/PC.htm

How to use the INSTR function to find something in a string
and
How to use the MID function to get part of a string
plus
How to use the "&" ampersand to stick 2 strings together

here's the code:
Private Sub lblENGLISHSPACEDOG_Click()

lblENGLISHSPACEDOG.Caption = _
Mid(lblENGLISHSPACEDOG.Caption, 1, InStr(lblENGLISHSPACEDOG.Caption, "CANADA") - 1) _
& "TORONTO"

End Sub