hssfworkbook

Opening and Saving new Workbooks - VBA

China☆狼群 提交于 2020-03-06 05:28:39
问题 So I know there have been questions on this before, but none seem to explicitly solve the problems I'm having. Effectively what I'm trying to do is create a new workbook, copy and paste data into it, and then save that new workbook under a new filename. No matter what I do, I seem to get various types of error messages. Here is my code. Any help is very appreciated! Private Sub DoStuff() CurrentFile = "June_Files_macros_new.xlsm" NewFile = "Train10_June01.xls" Workbooks.Add 'Save New Workbook