Groups > WordPerfect Office > Quattro Pro older versions > Re: Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3




Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3

Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3
Mon, 28 May 2007 20:50:51 -030
I created a data entry system that would allow the users to select one of
four floating boxes on a main page which would allow them to input data into
a specific area of the selected notebook sheet depending on the account
number input on the main data input table.

The floating box would activate a specific macro which would select the
first line in the area of the page determined by the input box used, and
then would insert a row at that point nd copy the data from the table into
the new row.

Since version 11, the users have been stuck manually inserting the rows and
data into the system. After two seasons of this manual input, they asked me
to fix the problem, but I have been trying since March 30th to solve this
issue, with no success. Everytime I think I have the problem solved, I get a
CARM window and the program crashes.

The macro sequence is a very simple search and insert, with some little
additional steps to verify that a proper page has been selected in the data
input window. There are some error handling routines that give the user a
chance to select a new page or cancel the operation if the desired page is
not one that is contained in the notebook.

Finally, a fifth file collates all the data from the original four files and
gives a supervisor a running count of the data.

I have tried new Notebook|Insert File, have tried copying Macros from one
file to a new file and have tried to make the program run as *.wb3 files
(which seemed to work) but always end up with the dreaded CARM Notice.

The files are not corrupt, but cannot be saved into Excel as all formula and
macro and floating objects are lost.

Are there any suggestions?

TIA

Rob



Post Reply
Re: Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3
Tue, 29 May 2007 11:20:13 -060
Rob Prescott wrote:
> But my problem stemsfrom the fact that I can get the program to run for a 
> few input cycles, and then the CARM occurs and the system will not allow 
> this file to work afterwards.

The phenomenon you describe (several successful cycles, followed by failure) is

similar to something I encountered several years ago with a macro I designed in

QP8.  I subsequently discovered that QP's stack limit when running subroutines 
is a key factor in the program's ability to execute subroutines repeatedly.  In

a nutshell, the BRANCH statement should be used to call a subroutine repeatedly

(rather than calling the subroutine directly), because a direct call IS affected

by the stack limit, whereas BRANCHing to a subroutine isn't.  The stack limit 
quickly becomes a limiting factor when making repeated subroutine calls without

using , presenting itself during runtime just as you describe:  several

initial successful iterations, followed by execution failure before the macro 
has finished.

What is puzzling is that your macro ran without problems in earlier versions, 
which may indicate that the above issue does not come into play here at all, 
unless perhaps your code modification (when converting from one version to 
another) also included changes to how your subroutines are called.

Another issue may simply be spreadsheet portability.  QP seems to have had 
problems allowing a smooth migration of older spreadsheets to newer program 
versions, especially since QP9.  Perhaps your spreadsheet needs to be re-created

in X3.  You could create a simple test file with the necessary infrastructure, 
then add the macro code, and test how the code performs then.

Finally, running your macro in debug mode may help pinpoint the specific code 
which causes things to go belly-up.

Cheers,
Uli
Post Reply
Re: Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3
Tue, 29 May 2007 12:17:53 +010
Rob:
> The floating box would activate a specific macro which would select the
> first line in the area of the page determined by the input box used, and
> then would insert a row at that point nd copy the data from the table into
> the new row.
> 
> Since version 11, the users have been stuck manually inserting the rows
and
> data into the system.

Stage 1:

Using 11.0.0.410, I created a Push Button and gave it the macro
{BlockInsert.Rows B:1;Entire}
and it worked as it should.
-- 
Good wishes!
Roy Lewis
C_Tech volunteer
(UK)

Post Reply
Re: Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3
Tue, 29 May 2007 12:55:55 -030
Thanks Roy,

But my problem stemsfrom the fact that I can get the program to run for a 
few input cycles, and then the CARM occurs and the system will not allow 
this file to work afterwards.

The macros are a little more complex then I described in my initial post, 
but not significantly different.from all that. As said, I have some tests to 
ensure the page is valid, and then some IF statements to find the correct 
starting point, and finally the transfer of the data.

The issue I have is that the file will appearto work crrectly for a number 
of iterations, and then cough and die. After that, reloading the file is 
extremely long and saving may fail with a CARM as well.

The file was originally a WB2 which was rewritten to work as a WB3 because 
some of the Macro commands worked differently in 7 and 8 than 6.

Now that we are using X3, the file just seems to cough-up and die within 5 
uses no matter how it is created.

Thanks for the help,

Rob
"lemoto" <ctech@corel.ca> wrote in message 
news:VA.000045d5.001b6c43@corel.ca...
>
> Rob:
>> The floating box would activate a specific macro which would select
the
>> first line in the area of the page determined by the input box used,
and
>> then would insert a row at that point nd copy the data from the table 
>> into
>> the new row.
>>
>> Since version 11, the users have been stuck manually inserting the rows

>> and
>> data into the system.
>
> Stage 1:
>
> Using 11.0.0.410, I created a Push Button and gave it the macro
> {BlockInsert.Rows B:1;Entire}
> and it worked as it should.
> -- 
> Good wishes!
> Roy Lewis
> C_Tech volunteer
> (UK)
>
> 


Post Reply
Re: Macros created for QP6, 7 & 8 fail in 10, 11, 12 and X3
Tue, 29 May 2007 13:48:58 -030
Thanks for the suggestion, but in my first post, I covered the corrupt file 
steps I have tried to follow, and New Notebook File|Insert was one of  them.

I may have to reinstall the version QP8 and run it for this one important 
file so that they can start getting their work done. I give myself two more 
days to try and solve it before I give up completely.
"lemoto" <ctech@corel.ca> wrote in message 
news:VA.000045e3.001aaf7b@corel.ca...
>
> Rob:
>> The issue I have is that the file will appearto work crrectly for a 
>> number
>> of iterations, and then cough and die. After that, reloading the file
is
>> extremely long and saving may fail with a CARM as well.
>
>> The file was originally a WB2 which was rewritten to work as a WB3 
>> because
>> some of the Macro commands worked differently in 7 and 8 than 6.
>
> This sounds as if a combination of circumstances is causing the problem.
> Were any Charts carried through? - not that I have heard of them causing
> macros to fail, but there are some incompatibilities with v9 and earlier 
> vs
> v10 and later which could be unhelpful.
>
> You can disable the report system. Navigate to:
> Start|....|WPO X3|Support|CARM Organizer
> Sometimes this improves stability.
>
> It is also possible that after all these format changes and edits the file
> has become corrupt. You could try in a blank document File|Insert...
> -- 
> Good wishes!
> Roy Lewis
> C_Tech volunteer
> (UK)
>
> 


Post Reply
<< Previous 1 2 3 Next >>
( Page 1 of 3 )
about | contact