This may or may not help , but you have not actually declared startStr as String. You have declared it as Variant