tenken Posted May 20, 2008 Share Posted May 20, 2008 (edited) Hi all, I'm trying to select multiple cells with this function and it doesn't work. May be my syntax is wrong : _ExcelCopy($oExcel, "C1;D1;H1;L1") So I'm trying to select different cells one by one, and I can't. In opposite, this syntax works perfectly : _ExcelCopy($oExcel, "C1:L1") but that's not that I want to do ^^ Thanks Edited May 20, 2008 by tenken Link to comment Share on other sites More sharing options...
Kerros Posted May 20, 2008 Share Posted May 20, 2008 _ExcelCopy is going to either copy a cell or a range of cells with the appropriate syntax. so you could do an: _ExcelCopy($oExcel, C1:D1) _ExcelCopy($oExcel, H1) _ExcelCopy($oExcel, L1) as those can be made into ranges, or copy each cell individually. You could also write a custom function based on what is in the ExcelCom_UDF to select cells based on what is in an array or something if you really want to copy all the cells at once. Kerros Kerros===============================================================How to learn scripting: Figure out enough to be dangerous, then ask for assistance. Link to comment Share on other sites More sharing options...
tenken Posted May 20, 2008 Author Share Posted May 20, 2008 _ExcelCopy is going to either copy a cell or a range of cells with the appropriate syntax. so you could do an: _ExcelCopy($oExcel, C1:D1) _ExcelCopy($oExcel, H1) _ExcelCopy($oExcel, L1) as those can be made into ranges, or copy each cell individually. You could also write a custom function based on what is in the ExcelCom_UDF to select cells based on what is in an array or something if you really want to copy all the cells at once. Kerros Thanks a lot for your help; but there's something strange : I had retry to use this syntax _ExcelCopy($oExcel, "C1;D1;H1;L1") and it worked, the script paste the cells, but crash just after that :s I don't understand where the problem is ? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now