Solved how to copy file with macro module

January 6, 2014 at 18:27:58
Specs: Windows 7
My ex-colleague create invoice using ms excel 2010.

In year 2013, my colleague create the invoice start fr worksheet name 13-001, 13-002 .... until 13-250. there is a summary file which had link with all these invoice sheet with the total amount figure in that invoice ( I do not know how she do it, something like using macro module & I do not know about these).

When come to year 2014. I copy invoice file year 2013 to create year 2014. I found out that some format that she using module macro was diferrent.

So, how to copy the file?

See More: how to copy file with macro module

Report •

January 7, 2014 at 00:45:42
✔ Best Answer

Click the Visual Basic icon.
You should get the code listed of all macros and functions, used for that worksheet.
Here you can select the parts you need and copy it to the clipboard.
Now open the 2014 worksheet, open Visual Basic from the Macros menu and past the copied macros.

Report •

January 14, 2014 at 20:20:39

HI, I had copy & paste the module in new sheet of year 2014. Its work , all each sheet of my invoice can read the currency & change to words.

But there is a problem here. Everytime when I copy other invoice sheet, I need to change the macro security to : Enable all macro (not reccomanded ....) then only the currency will change in words, if not it will become #NAME? (all my worksheet in that file become #NAME?).
After copy the file only I change back the security macro to : Disable all macros except digitaly sign macro. Then my file would not be #NAME?

So, what can I do to settle this problem. so that everytime when I copy a file the currency would not be #NAME? without change the macro security to : Enable all macro .... course my previos file (year 2013) no need to change the security file.

Many thanks.

Report •

January 15, 2014 at 11:15:16
Didn't we cover this in your other thread entitled: "copy file from microsoft excel2010 to another workbook"?

I'll repeat what I posted in that thread:

"Yes, you need to enable macros in order for the UDF's to work.

As long as you have a decent anti-virus program installed and running, you shouldn't have to worry about setting the macro security to Low. The warning about it being "Not Recommended" is Microsoft's way of protecting themselves because they have no way of knowing to what extent your machine is protected.

Of course, it's easy for me to tell you to set it to Low without knowing about your virus protection because I doubt you'll come after me if some dangerous code ends up on your machine. Ultimately it's up to you to protect your machine(s) against viruses and malware.

Keep in mind, that if you give this workbook to other users, they too will need to enable macros in order for the UDF's to work for them. You can't force them to enable macros via any kind of code or Excel function, they have to do it themselves.'

Click Here Before Posting Data or VBA Code ---> How To Post Data or Code.

Report •

Related Solutions

Ask Question