Anybody have (or care to bang out) a tidy code snippet for a function that copies a CSV list of columns from the active sheet into a new workbook? It would be used something like this:
ColList = "A, C, E, F, C"
Result = CopyCols(ColList)
. . . which would write the values in those columns to a new workbook in columns A-E (I don't really care what the function returns - a Boolean flag or a pathname would be fine). Note that the columns are not necessarily in order, and that they may appear more than once. And yes, I realize that this will cause problems for columns containing formulas. I just want the cell values.
Thanks for any input! All my ideas so far have been kludgy and not worth attempting. . .
VBAjedi![[swords] [swords] [swords]](/data/assets/smilies/swords.gif)
ColList = "A, C, E, F, C"
Result = CopyCols(ColList)
. . . which would write the values in those columns to a new workbook in columns A-E (I don't really care what the function returns - a Boolean flag or a pathname would be fine). Note that the columns are not necessarily in order, and that they may appear more than once. And yes, I realize that this will cause problems for columns containing formulas. I just want the cell values.
Thanks for any input! All my ideas so far have been kludgy and not worth attempting. . .
VBAjedi
![[swords] [swords] [swords]](/data/assets/smilies/swords.gif)