Emergency !!!

matthew230

Board Regular
Joined
Jan 2, 2006
Messages
152
Hi,

I have spent the whole day coding a little utility to automate some document production.

Unfortunately during testing I have managed to lock it into some kind of loop. I have a macro instructing it to print a sheet from a userform button. It has now opened the print preview screen, but I forgot to hide the userform, and now everything is jut binging at me when I click on it.

I checked when I had last saved it, and it was 2 hours ago !!

Anybody know any tricks to get out of this l

Thanks,

Matt
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,357
Office Version
  1. 365
Platform
  1. Windows
Have you tried CTRL+BREAK?
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,357
Office Version
  1. 365
Platform
  1. Windows
Can you access the VBE?
 

matthew230

Board Regular
Joined
Jan 2, 2006
Messages
152
Can you access the VBE?

No: not by alt-f11, which is my usual method.

There must be something. I can't be the first idiot to do this !!!

:eek:
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Have you attempted to close Excel using the Red X, this can normally interrupt the code enough to get it to stop. Have you checked what the Task Manager has said about Excel?
 

matthew230

Board Regular
Joined
Jan 2, 2006
Messages
152
Have you attempted to close Excel using the Red X, this can normally interrupt the code enough to get it to stop. Have you checked what the Task Manager has said about Excel?

The red button is disabled as we are on print preview screen, and the userform is still displayed. The red button is on the userform enabled, but just keeps giving windows error noise.

Task manager showing 0 CPU and 25mb ram. Which would be normal.

Perhaps there is another task other than excel that I could try to stop ??
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
If you close Excel totally and reopen your workbook selecting 'Disable Macro's' is that possible
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,128
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Mobile
  3. Web
Reason I ask is that you may be able to access the code and find out what exactly it is that causes the unwanted loop. I have done this myself in the past and I have read posts that show the same
 

matthew230

Board Regular
Joined
Jan 2, 2006
Messages
152
If you close Excel totally and reopen your workbook selecting 'Disable Macro's' is that possible

Actually closing excel is not a problem. I could do that through task manager. But then I will probably lose two hours of coding ! I need to to some how close the userform so I can close the print preview and then save the progress before making the changes needed so it doesn't happen again.
 

Forum statistics

Threads
1,181,658
Messages
5,931,272
Members
436,786
Latest member
Deniel

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top