企业绩效管理网

 找回密码
 立即注册

QQ登录

只需一步,快速开始

查看: 1895|回复: 7

Error saving excel workbook with Macros

[复制链接]

79

主题

383

帖子

562

积分

高级会员

Rank: 4

积分
562
QQ
发表于 2014-6-28 05:28:54 | 显示全部楼层 |阅读模式
Hi,

I have been working on an excel workbook with active forms for a few weeks now and been saving it to Perspectives as an application and it works fine. This morning I have added some VBA + macros in excel but it will not let me save to Perspectives. When I try it tells me that I need to change the format of teh file to a Macro Enabled Excel Workbook. When I do this I can save to perspectives.

However, when I try and open teh application in Perspectives I get the following error:
"Excel cannot open teh file 'TM156.xlsx' because the file format or file extention is not valid. Verify that the file has not been corrupted and that the file extention matches the format of the file"

When I view the application in perspectives it reads "TM156.xlsm.xlsx". I have tried to change the filer type to "TM156.xlsm" - I get a similar error.

Please help!
回复

使用道具 举报

66

主题

395

帖子

544

积分

高级会员

Rank: 4

积分
544
QQ
发表于 2014-6-28 07:04:57 | 显示全部楼层
You need to save as XL 2003 .xls format.

(you wouldn't think it is that difficult but support for .xlsx and .xlsm is still not great, the best alternative is to simply save in the old format)
回复 支持 反对

使用道具 举报

81

主题

429

帖子

608

积分

高级会员

Rank: 4

积分
608
QQ
发表于 2014-6-28 07:24:14 | 显示全部楼层
Hi Lotsaram,

thanks for your help. I have saved the workbook as Excel 97-2003 and it has automaticallly saved it as Compatability Mode.

When I open the workbook it opens without error. However, when I try and run teh macro that was previsouly saved I get the eeror message:
"Cannot run the macro 'TM176.xls!Menu_CostCentre'. The macro may not be available in tehis workbook or all macros may be disabled"

under the developer ribbon/Macro security I have checked the "Enable all macros..." still has the same error. I have aldo tried ticking "Trust access to the VBA project ojject model", still no luck. This is all on the client side.

I have logged onto the server and opened excel and selected the same options. Gone back to teh client side and opened teh application again (workbook with active forms and VBA) and the macro error message still appears!

Do you know what I am doing wrong?

Thanks for you help with this.
回复 支持 反对

使用道具 举报

93

主题

423

帖子

630

积分

高级会员

Rank: 4

积分
630
QQ
发表于 2014-6-28 07:38:21 | 显示全部楼层
Lostaram...I meant to add...the macros IS definitely available in the workbook!

Cheers
回复 支持 反对

使用道具 举报

70

主题

353

帖子

524

积分

高级会员

Rank: 4

积分
524
QQ
发表于 2014-6-28 07:55:19 | 显示全部楼层
tosca1978 wroteo you know what I am doing wrong?
Nope.
回复 支持 反对

使用道具 举报

74

主题

392

帖子

562

积分

高级会员

Rank: 4

积分
562
QQ
发表于 2014-6-28 07:55:23 | 显示全部楼层
Try right clicking on the application folder in Server Explorer and using the Add File option to upload the original .xlsm file.

It was the only way I could get TM1 to handle .xlsm files properly.
回复 支持 反对

使用道具 举报

58

主题

393

帖子

540

积分

高级会员

Rank: 4

积分
540
QQ
发表于 2014-6-28 08:42:33 | 显示全部楼层
mikegrain wrote:Try right clicking on the application folder in Server Explorer and using the Add File option to upload the original .xlsm file.

It was the only way I could get TM1 to handle .xlsm files properly.
It works! Thanks for your tips!
回复 支持 反对

使用道具 举报

79

主题

390

帖子

562

积分

高级会员

Rank: 4

积分
562
QQ
发表于 2014-6-28 09:43:21 | 显示全部楼层
Having spent time downloading FP3 after reading this -

I discovered that this didn't work BUT then I tried  'MikeGrain' 's suggestion above and it worked - using the 'add file' option.  This works perfectly.

Thanks for solving a frustrating problem!

- Rob

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

QQ|手机版|小黑屋|企业绩效管理网 ( 京ICP备14007298号   

GMT+8, 2023-3-30 20:05 , Processed in 0.068132 second(s), 40 queries .

Powered by Discuz! X3.1 Licensed

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表