Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Version makes the difference?!
Hi everyone, I encounter a problem with running macro in Excel. Basically all works fine with Excel 2003(tested on 2 machines) whilst a run-time error '1004' was fired on Excel 2000( failed on 2 machines). Apparently there's somethiing wrong with compatibility issues between these 2 vesions. The detailed message says: run-time error '1004': The cell or chart you are trying to change is protected and therefore read only. That's true and used to prevent certain cells being modified by users. But it does run smoothly on Excel 2003 without any problem. The piece of code causing the problem: Range(\"K10\").Select 'Macro halts on the next line ActiveCell.Formula = \"=SUMIF($D$26:$D$65536,\"\"POOL\"\",$M$26:$M$6553 6)\" I need to make it work on both versions...Any idea of the solution? All kinds of help will be appreciated. Thanks Frank -- uglyvb ------------------------------------------------------------------------ uglyvb's Profile: http://www.excelforum.com/member.php...o&userid=31720 View this thread: http://www.excelforum.com/showthread...hreadid=519542 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Version makes the difference?!
Tthe workaround would be to add
ActiveSheet.UnProtect Password:="Whatever" <Your Code ActiveSheet.Protect Password:="Whatever" but someone may have a 'real' answer! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Version makes the difference?!
Thanks jakeyC for the nice workaround, which dismisses the runtime error!...May I also refer you to http://www.excelforum.com/showthread.php?t=519532, where a proper solution has also been supplied?... Regards Frank -- uglyvb ------------------------------------------------------------------------ uglyvb's Profile: http://www.excelforum.com/member.php...o&userid=31720 View this thread: http://www.excelforum.com/showthread...hreadid=519542 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I save an Excel 97-2003 version or 2007 version for Mac 200 | Excel Discussion (Misc queries) | |||
Wrap Text: Print Version different than Screen Version | Excel Discussion (Misc queries) | |||
Recover earlier version of excel sheet after new version saved? | Excel Discussion (Misc queries) | |||
Version difference when opening text files? | Excel Programming | |||
Difference in the listing of the New module addition in 2002 version | Excel Discussion (Misc queries) |