Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Macro Section Skipped

I have some fairly complicated macros set up. They work fine on my computer,
I have had no difficulty and use them with great success. However when put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros. Click
button and voila you have everything set to go on it's own. The macro runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where it
skips and then play the macro to that point then step through the rest. It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,311
Default Macro Section Skipped

Maybe it has something to do with Application Events being disabled.
Try adding this to the beginning of your code.

Application.EnableEvents = True

Regards,
Paul


"bodhisatvaofboogie" wrote in
message ...
I have some fairly complicated macros set up. They work fine on my
computer,
I have had no difficulty and use them with great success. However when
put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros.
Click
button and voila you have everything set to go on it's own. The macro
runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where
it
skips and then play the macro to that point then step through the rest.
It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is
when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro Section Skipped

You probably have ON ERROR Resume Next statement in the code. The error
statement are masking the problems. I would put break points on error
statements in the code to find the problems. Usually these type problems
have to due with Permissions the co-workers have set up in their accounts.

"PCLIVE" wrote:

Maybe it has something to do with Application Events being disabled.
Try adding this to the beginning of your code.

Application.EnableEvents = True

Regards,
Paul


"bodhisatvaofboogie" wrote in
message ...
I have some fairly complicated macros set up. They work fine on my
computer,
I have had no difficulty and use them with great success. However when
put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros.
Click
button and voila you have everything set to go on it's own. The macro
runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where
it
skips and then play the macro to that point then step through the rest.
It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is
when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Macro Section Skipped

Actually there aren't any ON ERROR RESUME NEXT sections in the macro, I
utilized If statements with GOTO line X kinds of things. It turned out to
be simpler that way for me. I narrowed it down in the macro what gets
skipped, and like I said when I put a stop there and run the macro to that
point then step through it NEVER errors. So I can't see what is happening if
it's working when I'm debugging it. It only skips the section when I play
macro from start to finish with no stops.

Also, my co-worker and I have the same permissions for everything, so I'm
still lost.

It just doesn't make sense *sigh*


"Joel" wrote:

You probably have ON ERROR Resume Next statement in the code. The error
statement are masking the problems. I would put break points on error
statements in the code to find the problems. Usually these type problems
have to due with Permissions the co-workers have set up in their accounts.

"PCLIVE" wrote:

Maybe it has something to do with Application Events being disabled.
Try adding this to the beginning of your code.

Application.EnableEvents = True

Regards,
Paul


"bodhisatvaofboogie" wrote in
message ...
I have some fairly complicated macros set up. They work fine on my
computer,
I have had no difficulty and use them with great success. However when
put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros.
Click
button and voila you have everything set to go on it's own. The macro
runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where
it
skips and then play the macro to that point then step through the rest.
It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is
when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default Macro Section Skipped

Maybe it has to do with the speed of the different computers. I wrote a
program a few weeks ago that had multiple listboxes that the user had to
select. the program was only displaying 1 list box instead of three. It
turned out the program ran so quickly, it thought the mouse was still pressed
from the 1st list box when it got to the 2nd list box and continued without
giving the user an option to select from the 2nd list box. I had to add a
pause between the to list box selection to get the program to work.

"bodhisatvaofboogie" wrote:

Actually there aren't any ON ERROR RESUME NEXT sections in the macro, I
utilized If statements with GOTO line X kinds of things. It turned out to
be simpler that way for me. I narrowed it down in the macro what gets
skipped, and like I said when I put a stop there and run the macro to that
point then step through it NEVER errors. So I can't see what is happening if
it's working when I'm debugging it. It only skips the section when I play
macro from start to finish with no stops.

Also, my co-worker and I have the same permissions for everything, so I'm
still lost.

It just doesn't make sense *sigh*


"Joel" wrote:

You probably have ON ERROR Resume Next statement in the code. The error
statement are masking the problems. I would put break points on error
statements in the code to find the problems. Usually these type problems
have to due with Permissions the co-workers have set up in their accounts.

"PCLIVE" wrote:

Maybe it has something to do with Application Events being disabled.
Try adding this to the beginning of your code.

Application.EnableEvents = True

Regards,
Paul


"bodhisatvaofboogie" wrote in
message ...
I have some fairly complicated macros set up. They work fine on my
computer,
I have had no difficulty and use them with great success. However when
put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros.
Click
button and voila you have everything set to go on it's own. The macro
runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where
it
skips and then play the macro to that point then step through the rest.
It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is
when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 93
Default Macro Section Skipped

I think that may have solved the issue. I placed a 5 second pause at that
point in the macro that it was skipping. I'll run some tests, but thus far
it is working on some of the macros that were having the difficulties.
THANKS!!!



"Joel" wrote:

Maybe it has to do with the speed of the different computers. I wrote a
program a few weeks ago that had multiple listboxes that the user had to
select. the program was only displaying 1 list box instead of three. It
turned out the program ran so quickly, it thought the mouse was still pressed
from the 1st list box when it got to the 2nd list box and continued without
giving the user an option to select from the 2nd list box. I had to add a
pause between the to list box selection to get the program to work.

"bodhisatvaofboogie" wrote:

Actually there aren't any ON ERROR RESUME NEXT sections in the macro, I
utilized If statements with GOTO line X kinds of things. It turned out to
be simpler that way for me. I narrowed it down in the macro what gets
skipped, and like I said when I put a stop there and run the macro to that
point then step through it NEVER errors. So I can't see what is happening if
it's working when I'm debugging it. It only skips the section when I play
macro from start to finish with no stops.

Also, my co-worker and I have the same permissions for everything, so I'm
still lost.

It just doesn't make sense *sigh*


"Joel" wrote:

You probably have ON ERROR Resume Next statement in the code. The error
statement are masking the problems. I would put break points on error
statements in the code to find the problems. Usually these type problems
have to due with Permissions the co-workers have set up in their accounts.

"PCLIVE" wrote:

Maybe it has something to do with Application Events being disabled.
Try adding this to the beginning of your code.

Application.EnableEvents = True

Regards,
Paul


"bodhisatvaofboogie" wrote in
message ...
I have some fairly complicated macros set up. They work fine on my
computer,
I have had no difficulty and use them with great success. However when
put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros.
Click
button and voila you have everything set to go on it's own. The macro
runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where
it
skips and then play the macro to that point then step through the rest.
It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is
when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,986
Default Macro Section Skipped

If the part being skipped was the page setup, the delay will compensate for
the dialogue between the computer and external print device. That can happen
on a network device more often than a local printer. A five second delay
might be overkill, but if you don't have to worry about time, that's OK. A
one second delay would probably be sufficient.

"bodhisatvaofboogie" wrote:

I think that may have solved the issue. I placed a 5 second pause at that
point in the macro that it was skipping. I'll run some tests, but thus far
it is working on some of the macros that were having the difficulties.
THANKS!!!



"Joel" wrote:

Maybe it has to do with the speed of the different computers. I wrote a
program a few weeks ago that had multiple listboxes that the user had to
select. the program was only displaying 1 list box instead of three. It
turned out the program ran so quickly, it thought the mouse was still pressed
from the 1st list box when it got to the 2nd list box and continued without
giving the user an option to select from the 2nd list box. I had to add a
pause between the to list box selection to get the program to work.

"bodhisatvaofboogie" wrote:

Actually there aren't any ON ERROR RESUME NEXT sections in the macro, I
utilized If statements with GOTO line X kinds of things. It turned out to
be simpler that way for me. I narrowed it down in the macro what gets
skipped, and like I said when I put a stop there and run the macro to that
point then step through it NEVER errors. So I can't see what is happening if
it's working when I'm debugging it. It only skips the section when I play
macro from start to finish with no stops.

Also, my co-worker and I have the same permissions for everything, so I'm
still lost.

It just doesn't make sense *sigh*


"Joel" wrote:

You probably have ON ERROR Resume Next statement in the code. The error
statement are masking the problems. I would put break points on error
statements in the code to find the problems. Usually these type problems
have to due with Permissions the co-workers have set up in their accounts.

"PCLIVE" wrote:

Maybe it has something to do with Application Events being disabled.
Try adding this to the beginning of your code.

Application.EnableEvents = True

Regards,
Paul


"bodhisatvaofboogie" wrote in
message ...
I have some fairly complicated macros set up. They work fine on my
computer,
I have had no difficulty and use them with great success. However when
put
in place on a co-workers computer they do not. I've already went through
line by line to make sure everything is identical, and when testing the
macros they worked fine at first. NOW, strange things are happening as
follows:

I have buttons set up in a spreadsheet that are linked to the macros.
Click
button and voila you have everything set to go on it's own. The macro
runs,
but skips the last part where it does a page setup and saves the file to a
destination determined by the macro. I placed a stop in the macro where
it
skips and then play the macro to that point then step through the rest.
It
works fine when I do that. So I'm confused as to why it would work fine
while stepping through, but not when you play it start to finish that is
when
it skips that last section of the macro.

Any ideas??? Thanks in advance!!! :)



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
worksheet skipped in page numbering Zach Excel Discussion (Misc queries) 0 January 12th 10 08:04 PM
How do I set up a macro to clear data from a section? bwerner53 Excel Discussion (Misc queries) 1 November 1st 09 05:35 PM
Macro to email filtered section as attachment Tamara Excel Discussion (Misc queries) 6 November 1st 08 05:30 PM
No void value skipped by graphic chart news.tin.it Charts and Charting in Excel 3 March 6th 05 04:27 PM
FYI - VBE Breakpoints Skipped due to Conditional Format David Sauder Excel Programming 0 July 22nd 03 06:43 AM


All times are GMT +1. The time now is 06:59 PM.

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"