0

I have 2 versions of workbook with macros. Latest version is 4. I have all my test cases (test case are really in huge number) written in version 3 of macros on Excel Workbook . Now I need update my workbook to version 4 of macros. What is the best way to do so apart from copy/pasting?

Community
  • 1
  • 1
user2496751
  • 41
  • 2
  • 5
  • 1
    3 questions for you. `1` Which excel version? `2` Are the test cases in worksheets? `3` Are the macros in the worksheet, workbook or in a module? – Siddharth Rout Dec 11 '13 at 04:31
  • (1) MS Excel 2010, (2) Yes , test cases are already present in worksheets. (3) Macros are in modules. I have 4 modules – user2496751 Dec 11 '13 at 04:41
  • 1
    Here is what I might do. `1` Delete all the sheets except one from version 4. `2` Copy all the sheets from version 3 after the 1st sheet in version 4 `3` Delete sheet1 from version 4 – Siddharth Rout Dec 11 '13 at 04:44
  • [HERE](http://stackoverflow.com/questions/20292921/unable-to-copy-huge-volume-of-data-in-excel-in-vbscript/20294278#20294278) is the Logic in action :) – Siddharth Rout Dec 11 '13 at 05:07

1 Answers1

0

You can simply export your macros from version 3 and import them to version 4. Also, for copying the test cases from ver 3 to ver 4, you can use move/copy option that you get when you right click on the sheet name.

Kaushik Datye
  • 121
  • 1
  • 3
  • 11
  • And I would suggest using Rob Bovey's `VBA Code Cleaner` to export/import the macros, available [Here](http://www.appspro.com/) – DaveU Dec 11 '13 at 05:54
  • `You can simply export your macros from version 3 and import them to version 4.` OP doesn't want to export macros ;) – Siddharth Rout Dec 11 '13 at 05:56
  • I have ActiveX Controller is the first work sheet. Clicking on the same would run macro module. I have 3 controllers in Version3 and 4 in version4. How to update the same? – user2496751 Dec 11 '13 at 06:14