
- VBA Tutorial
- VBA - Home
- VBA - Overview
- VBA - Excel Macros
- VBA - Excel Terms
- VBA - Macro Comments
- VBA - Message Box
- VBA - Input Box
- VBA - Variables
- VBA - Constants
- VBA - Operators
- VBA - Decisions
- VBA - Loops
- VBA - Strings
- VBA - Date and Time
- VBA - Arrays
- VBA - Functions
- VBA - Sub Procedure
- VBA - Events
- VBA - Error Handling
- VBA - Excel Objects
- VBA - Text Files
- VBA - Programming Charts
- VBA - Userforms
- VBA Useful Resources
- VBA - Quick Guide
- VBA - Useful Resources
- VBA - Discussion
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
VBA - Join Function
A Function, which returns a string that contains a specified number of substrings in an array. This is an exact opposite function of Split Method.
Syntax
Join(List[,delimiter])
Parameter Description
List − A required parameter. An array that contains the substrings that are to be joined.
Delimiter − An optional parameter. The character, which used as a delimiter while returning the string. The default delimiter is Space.
Example
Add a button and add the following function.
Private Sub Constant_demo_Click() ' Join using spaces a = array("Red","Blue","Yellow") b = join(a) msgbox("The value of b " & " is :" & b) ' Join using $ b = join(a,"$") msgbox("The Join result after using delimiter is : " & b) End Sub
When you execute the above function, it produces the following output.
The value of b is :Red Blue Yellow The Join result after using delimiter is : Red$Blue$Yellow
vba_arrays.htm
Advertisements