VBA: Reverse an array?
问题 How could I reverse an array that is full of integers e.g.: [1;5;8;45;54] To: [54;45;8;5;1] Are there any built in functions I could use? I tried using this method: Array.Reverse(arr) I added Mscorlib.dll from Tools > References, but it showed error: Syntax error. At the Array.Reverse(arr) location. 回答1: Array.Reverse sounds like VB.Net, not VBA. Chip Pearson has functions for just about anything you will want to do with arrays (and other structures). http://www.cpearson.com/excel/vbaarrays