The Versatile Split Function
VBA's Split function, introduced with Excel 2000, can simplify many programming tasks. This function accepts a text string, and returns a zero-based variant array that contains the elements of the string (you specify the character that delimits the elements).A simple exampleThe procedure below demonstrates how the Split function works.Sub SplitDemo() Dim txt As String Dim x As Variant Dim i As Long txt = "The Split function is versatile" x = Split(txt, " &
A VBA Function to Get a Value From a Closed File
VBA does not include a method to retrieve a value from a closed file. You can, however, take advantage of Excel's ability to work with linked files.This tip contains a VBA function that retrieves a value from a closed workbook. It does by calling an XLM macro.Note:You cannot use this function in a worksheet formula.The GetValue FunctionThe GetValue function, listed below takes four arguments: path: The drive and path to the closed file (e.g., "d:files") file: The workbook name (e.g., &