Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
worksheet skipped in page numbering | Excel Discussion (Misc queries) | |||
How do I set up a macro to clear data from a section? | Excel Discussion (Misc queries) | |||
Macro to email filtered section as attachment | Excel Discussion (Misc queries) | |||
No void value skipped by graphic chart | Charts and Charting in Excel | |||
FYI - VBE Breakpoints Skipped due to Conditional Format | Excel Programming |