Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access Macro halts.

Status
Not open for further replies.

hal8000

Programmer
Sep 26, 2000
19
US
I have a sub that dynamically sets the print area of an Excel sheet. It works perfectly when I run it from the VB editor. I set it up to be run by a function so that I can use it as a macro. I can run the function which runs the sub in the editor and it works fine. When I setup the macro to run it halts. The only message I get is action failed. I did have problems with the sub leaving an Excel process running and have added an End statement to the procedure which fixes the hanging process but seems to cause the macro to halt. If I take the end out, the macro runs but an Excel process is left running. In both cases the sub logic gets executed. Has this happened to anyone else? Thanks in advance for any ideas.
 
Hi!

This thread (thread181-837649) contains some usefull information on this. It is probably caused by how you instantiate and reference the Excel objects.

Roy-Vidar
 
Thank you for the reply. I solved this problem with the help received in another thread. I need to express myself explicitly.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top