Problem on Transfering and Saving excel file with vba code

2007-06-07 7:24 am
I have written a vba code in an excel file. The program can run sucessfully.I save the code and re-open the file, I can also run the program.

I transfer the excel file to the other compute. However, the program cannot run in other computer and I found that the vba code disappeared.

Is it a problem on the saving place of the vba coding?
And how can I change the saving place of the coding, so that I can change the coding in the current workbook?

Thanks

回答 (2)

2007-06-07 8:35 pm
✔ 最佳答案
You have two choices:

1. Compile your vba to an add-in and it will export an add-in file with extension (.xla). Then, you can copy this add-in file to another computer and import in it's excel.

For details, please refer to http://www.fontstuff.com/vba/vbatut03.htm

2. Copy the code (remember all extra dll libraries if used) to another computer. And open a new VBA project in that computer and paste the code to there.

Thanks
2007-06-07 9:11 pm
First possible solution
You have not insert a module into the personel.xls of the new computer and copy the code into the module?
Second possible solution
If the vba code is solely used by the file, simply copy the code into “this workbook” of your file.
Third possible solution
If you use the pull-down menu to execute the Marco, be sure that you have selected the right place named “巨集存放在”

hope this help


收錄日期: 2021-04-12 21:55:50
原文連結 [永久失效]:
https://hk.answers.yahoo.com/question/index?qid=20070606000051KK05165

檢視 Wayback Machine 備份