Solved copy file from microsoft excel2010 to another workbook

January 6, 2014 at 18:17:41
Specs: Windows 7
hi, I am using Microsoft excel 2010. When I copy a file to another workbook . My currency in words become #NAME? . but when I go to that cell the formula bar show " =getcurr(H46) " (original file's cell show is " Ringgit Malaysia : ") & another cell formula bar show " spellnumber(H46)" (original file's cell is eg : " One Hundred Only ". it will automatically to change the words depend on the figure.

1) so, how can I copy the file with the formula like this?


See More: copy file from microsoft excel2010 to another workbook

Report •


✔ Best Answer
January 8, 2014 at 08:59:56
Please note that since we can't see your workbook from where we are sitting, we are making some assumptions about what is going on. Hopefully the following infomation will be helpful.

First let's start with this: "When I copy a file to another workbook "

You can't copy a file to a workbook. A workbook is a file. You can copy a Sheet from one workbook to another workbook, so I'll assume that that is what you meant.

While paulsep is correct in that it appears that you are missing some "macros", let's be more specific.

It looks like there are User Defined Functions (UDF) in the original workbook. UDF's are pieces of VBA code that allow users to create and use functions that do things other than the built in functions that Excel provides.

A UDF is written and stored in a Standard Module in the Visual Basic Editor. Once it is stored, it becomes available for use as a cell based function, meaning that it essentially acts like any other Excel function.

A "macro" is usually considered a piece of VBA code that is run either manually by a user or automatically via a Event. A macro is not entered into a cell like a UDF is. Even though both macros and UDF's are written with VBA code, they are very diffferent.

As paulsep said, show the Developer tab as explained here:

http://office.microsoft.com/en-us/e...

In the original workbook, go into the VBA editor, open the module containing the code and copy the code. In the VBA Editor of the new workbook, click Insert...Module. Paste the code into the pane that opens. Save the workbook.

The UDF's should now work in the new workbook.

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

message edited by DerbyDad03



#1
January 7, 2014 at 00:25:56
For me, it looks like you are missing some self written macros.
Check this in the original Excel sheet and copy and past such macros to the new workbook.

Report •

#2
January 7, 2014 at 18:44:18
but how to do it? TQ

Report •

#3
January 8, 2014 at 01:58:26
You first have to acitivate the Developer Tools in Excel 2010, to get the Visual Basic Editor shown in the ribbon.

http://msdn.microsoft.com/en-us/lib...


Report •

Related Solutions

#4
January 8, 2014 at 08:59:56
✔ Best Answer
Please note that since we can't see your workbook from where we are sitting, we are making some assumptions about what is going on. Hopefully the following infomation will be helpful.

First let's start with this: "When I copy a file to another workbook "

You can't copy a file to a workbook. A workbook is a file. You can copy a Sheet from one workbook to another workbook, so I'll assume that that is what you meant.

While paulsep is correct in that it appears that you are missing some "macros", let's be more specific.

It looks like there are User Defined Functions (UDF) in the original workbook. UDF's are pieces of VBA code that allow users to create and use functions that do things other than the built in functions that Excel provides.

A UDF is written and stored in a Standard Module in the Visual Basic Editor. Once it is stored, it becomes available for use as a cell based function, meaning that it essentially acts like any other Excel function.

A "macro" is usually considered a piece of VBA code that is run either manually by a user or automatically via a Event. A macro is not entered into a cell like a UDF is. Even though both macros and UDF's are written with VBA code, they are very diffferent.

As paulsep said, show the Developer tab as explained here:

http://office.microsoft.com/en-us/e...

In the original workbook, go into the VBA editor, open the module containing the code and copy the code. In the VBA Editor of the new workbook, click Insert...Module. Paste the code into the pane that opens. Save the workbook.

The UDF's should now work in the new workbook.

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

message edited by DerbyDad03


Report •

#5
January 8, 2014 at 20:31:08
Many thanks. It work but why when I change my invoice figure it will become #NAME? if I choose the macro security to Disable all macro except digitally signed macros.

If I change the security macro to : Enable all macro (not recommended, potentially ....) , the currency & words will appear. And every time when I copy invoice sheet from 2013 to 2014. I need to change the security macro to this if not, the file will appear #NAME? instead of currency words.


Report •

#6
January 9, 2014 at 10:00:08
You will get some cells appear with #NAME, cause some cells will be calculated in the macros, which are not allowed, if you don't choose that.

Other cells might most likely be calculated in reference to others, that will be calculated from the macros. If they are not, such cells will show #NAME.


Report •

#7
January 12, 2014 at 19:06:12
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 •


Ask Question