Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Macro stops working when save as xlsm - any ideas?

I have a macro in a WB that has been working for years. Even when i moved to
XL2007, it worked fine, until i saved as xlsm. It will not work when the
book is saved as xlsm (so, my workaround is to keep using the xls version).

Here is the line that gives the error:
pt(1).PivotFields("Acct").CurrentPage = "Moe"

The error is "invalid procedure call or argument".

Any thoughts or ideas? How to fix/work around? Would be nice to save as
xlsm, since XL autrecovery saves are soooo slow with XLS for a fairly large
workbook.

Thanks, tom

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro stops working when save as xlsm - any ideas?


Is the error number 5?, do you have the pivot table name and sheets
names correct with no trailing spaces!

TomCon via OfficeKB.com;308307 Wrote:
I have a macro in a WB that has been working for years. Even when i
moved to
XL2007, it worked fine, until i saved as xlsm. It will not work when
the
book is saved as xlsm (so, my workaround is to keep using the xls
version).

Here is the line that gives the error:
pt(1).PivotFields("Acct").CurrentPage = "Moe"

The error is "invalid procedure call or argument".

Any thoughts or ideas? How to fix/work around? Would be nice to save as
xlsm, since XL autrecovery saves are soooo slow with XLS for a fairly
large
workbook.

Thanks, tom

--
Message posted via 'MS Office forums. More than 400,000 of Word, Excel,
Outlook, PowerPoint, Publisher, InfoPath discussions.'
(http://www.officekb.com)



--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
------------------------------------------------------------------------
Simon Lloyd's Profile: http://www.thecodecage.com/forumz/member.php?userid=1
View this thread: http://www.thecodecage.com/forumz/sh...ad.php?t=86193

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Macro stops working when save as xlsm - any ideas?

Yes, it is error #5! But, i don't think that there are any trailing spaces.
And, the macro works perfectly well when it is saved as xls. Only if it is
saved as xlsm, that the error occurs.

Can you tell me any more, or give any further tips?

Thanks
tom

Simon Lloyd wrote:
Is the error number 5?, do you have the pivot table name and sheets
names correct with no trailing spaces!

TomCon via OfficeKB.com;308307 Wrote:
I have a macro in a WB that has been working for years. Even when i
moved to

[quoted text clipped - 19 lines]
Outlook, PowerPoint, Publisher, InfoPath discussions.'
(http://www.officekb.com)



--
Message posted via http://www.officekb.com

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Macro stops working when save as xlsm - any ideas?

On Apr 15, 12:12*am, "TomCon via OfficeKB.com" <u50688@uwe wrote:
I have a macro in a WB that has been working for years. *Even when i moved to
XL2007, it worked fine, until i saved as xlsm. *It will not work when the
book is saved as xlsm (so, my workaround is to keep using the xls version).

Here is the line that gives the error:
pt(1).PivotFields("Acct").CurrentPage = "Moe"

The error is "invalid procedure call or argument".

Any thoughts or ideas? *How to fix/work around? *Would be nice to save as
xlsm, since XL autrecovery saves are soooo slow with XLS for a fairly large
workbook.

Thanks, tom

--
Message posted viahttp://www.officekb.com


Check to make sure you have the same add-in programs loaded you had
with 2003,
Also check the settings under Excel Options - make sure the save
function is set to the newer versions of excel.
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro stops working when sheet is protected RefLib1978 Excel Discussion (Misc queries) 3 May 28th 09 03:57 PM
Old, working macro now stops partway (without error) after Selection.Insert Charles Blaquière Excel Programming 0 October 16th 07 05:56 PM
Default a workbook to save as a xlsm (macro-enabled) in 2007 Razzer204 Excel Discussion (Misc queries) 3 March 21st 07 06:10 PM
Macro to insert data from another sheet stops working Nats Excel Programming 1 September 3rd 06 11:30 PM
macro randomly stops working johnlengacher Excel Programming 1 February 2nd 06 06:44 PM


All times are GMT +1. The time now is 08:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"