Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Why do I get Code Excution has been interupted


I wrote some quick code to open files and count some rows, and now, for every
file opening, I get a "Code Execution has been interupted" message. I didn't
have any code break in the code previously, and can't seem to get ride of
them. I tried doing a debug, and then saving for the heck of it, but it still
stops there next time around.

here's what runs the first stop:

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Title = "Select the original Funds Ops Check Request file"
.Show
For lngCount = 1 To .SelectedItems.Count

then I hit continue and it stops some 8 lines later:

'Open workbooks
Funds_Ops = "\\sandprdob01\StdReg\Outbound_Escheat\Escheat_Tru st_out.csv"
Workbooks.Open Filename:=Funds_Ops
FO = ActiveWorkbook.Name


And then again he
Workbooks.Open Filename:=Trust_Acct
TA = ActiveWorkbook.Name


Then it finishes the rest of the code. Am I missing some code here?

Thanks


----------------------------------------
Chris Freeman
IT Project Coordinator
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Why do I get Code Excution has been interupted


Hit reset in VBE. Save and close the workbook. Reopen and try again...Place
your code in between as below and try.

Sub Macro()
Application.DisplayAlerts = False

'place your code here

Application.DisplayAlerts = True
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

I wrote some quick code to open files and count some rows, and now, for every
file opening, I get a "Code Execution has been interupted" message. I didn't
have any code break in the code previously, and can't seem to get ride of
them. I tried doing a debug, and then saving for the heck of it, but it still
stops there next time around.

here's what runs the first stop:

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Title = "Select the original Funds Ops Check Request file"
.Show
For lngCount = 1 To .SelectedItems.Count

then I hit continue and it stops some 8 lines later:

'Open workbooks
Funds_Ops = "\\sandprdob01\StdReg\Outbound_Escheat\Escheat_Tru st_out.csv"
Workbooks.Open Filename:=Funds_Ops
FO = ActiveWorkbook.Name


And then again he
Workbooks.Open Filename:=Trust_Acct
TA = ActiveWorkbook.Name


Then it finishes the rest of the code. Am I missing some code here?

Thanks


----------------------------------------
Chris Freeman
IT Project Coordinator

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Why do I get Code Excution has been interupted


Jacob,
I placed the displayalert = false and =true in the code, but same thing: I
get the error watch. I don't know how/where/what to reset VBE. Where is that?

Thanks

--
Chris Freeman
IT Project Coordinator


"Jacob Skaria" wrote:

Hit reset in VBE. Save and close the workbook. Reopen and try again...Place
your code in between as below and try.

Sub Macro()
Application.DisplayAlerts = False

'place your code here

Application.DisplayAlerts = True
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

I wrote some quick code to open files and count some rows, and now, for every
file opening, I get a "Code Execution has been interupted" message. I didn't
have any code break in the code previously, and can't seem to get ride of
them. I tried doing a debug, and then saving for the heck of it, but it still
stops there next time around.

here's what runs the first stop:

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Title = "Select the original Funds Ops Check Request file"
.Show
For lngCount = 1 To .SelectedItems.Count

then I hit continue and it stops some 8 lines later:

'Open workbooks
Funds_Ops = "\\sandprdob01\StdReg\Outbound_Escheat\Escheat_Tru st_out.csv"
Workbooks.Open Filename:=Funds_Ops
FO = ActiveWorkbook.Name


And then again he
Workbooks.Open Filename:=Trust_Acct
TA = ActiveWorkbook.Name


Then it finishes the rest of the code. Am I missing some code here?

Thanks


----------------------------------------
Chris Freeman
IT Project Coordinator

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Why do I get Code Excution has been interupted


It would be worth to take a look at

http://www.excel-vba.com/excel-vba-contents.htm

If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

Jacob,
I placed the displayalert = false and =true in the code, but same thing: I
get the error watch. I don't know how/where/what to reset VBE. Where is that?

Thanks

--
Chris Freeman
IT Project Coordinator


"Jacob Skaria" wrote:

Hit reset in VBE. Save and close the workbook. Reopen and try again...Place
your code in between as below and try.

Sub Macro()
Application.DisplayAlerts = False

'place your code here

Application.DisplayAlerts = True
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

I wrote some quick code to open files and count some rows, and now, for every
file opening, I get a "Code Execution has been interupted" message. I didn't
have any code break in the code previously, and can't seem to get ride of
them. I tried doing a debug, and then saving for the heck of it, but it still
stops there next time around.

here's what runs the first stop:

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Title = "Select the original Funds Ops Check Request file"
.Show
For lngCount = 1 To .SelectedItems.Count

then I hit continue and it stops some 8 lines later:

'Open workbooks
Funds_Ops = "\\sandprdob01\StdReg\Outbound_Escheat\Escheat_Tru st_out.csv"
Workbooks.Open Filename:=Funds_Ops
FO = ActiveWorkbook.Name


And then again he
Workbooks.Open Filename:=Trust_Acct
TA = ActiveWorkbook.Name


Then it finishes the rest of the code. Am I missing some code here?

Thanks


----------------------------------------
Chris Freeman
IT Project Coordinator

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Why do I get Code Excution has been interupted


Jacob,
I don't see a reset in the VBE, so if its there, and you want to point it
out, I'd appreciate it.

Thanks
--
Chris Freeman
IT Project Coordinator


"Jacob Skaria" wrote:

It would be worth to take a look at

http://www.excel-vba.com/excel-vba-contents.htm

If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

Jacob,
I placed the displayalert = false and =true in the code, but same thing: I
get the error watch. I don't know how/where/what to reset VBE. Where is that?

Thanks

--
Chris Freeman
IT Project Coordinator


"Jacob Skaria" wrote:

Hit reset in VBE. Save and close the workbook. Reopen and try again...Place
your code in between as below and try.

Sub Macro()
Application.DisplayAlerts = False

'place your code here

Application.DisplayAlerts = True
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

I wrote some quick code to open files and count some rows, and now, for every
file opening, I get a "Code Execution has been interupted" message. I didn't
have any code break in the code previously, and can't seem to get ride of
them. I tried doing a debug, and then saving for the heck of it, but it still
stops there next time around.

here's what runs the first stop:

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Title = "Select the original Funds Ops Check Request file"
.Show
For lngCount = 1 To .SelectedItems.Count

then I hit continue and it stops some 8 lines later:

'Open workbooks
Funds_Ops = "\\sandprdob01\StdReg\Outbound_Escheat\Escheat_Tru st_out.csv"
Workbooks.Open Filename:=Funds_Ops
FO = ActiveWorkbook.Name


And then again he
Workbooks.Open Filename:=Trust_Acct
TA = ActiveWorkbook.Name


Then it finishes the rest of the code. Am I missing some code here?

Thanks


----------------------------------------
Chris Freeman
IT Project Coordinator



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8,520
Default Why do I get Code Excution has been interupted


Close the workbook and application. Reopen again.
--
If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

Jacob,
I don't see a reset in the VBE, so if its there, and you want to point it
out, I'd appreciate it.

Thanks
--
Chris Freeman
IT Project Coordinator


"Jacob Skaria" wrote:

It would be worth to take a look at

http://www.excel-vba.com/excel-vba-contents.htm

If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

Jacob,
I placed the displayalert = false and =true in the code, but same thing: I
get the error watch. I don't know how/where/what to reset VBE. Where is that?

Thanks

--
Chris Freeman
IT Project Coordinator


"Jacob Skaria" wrote:

Hit reset in VBE. Save and close the workbook. Reopen and try again...Place
your code in between as below and try.

Sub Macro()
Application.DisplayAlerts = False

'place your code here

Application.DisplayAlerts = True
End Sub

--
If this post helps click Yes
---------------
Jacob Skaria


"Chris Freeman" wrote:

I wrote some quick code to open files and count some rows, and now, for every
file opening, I get a "Code Execution has been interupted" message. I didn't
have any code break in the code previously, and can't seem to get ride of
them. I tried doing a debug, and then saving for the heck of it, but it still
stops there next time around.

here's what runs the first stop:

' Open the file dialog
With Application.FileDialog(msoFileDialogOpen)
.AllowMultiSelect = False
.Title = "Select the original Funds Ops Check Request file"
.Show
For lngCount = 1 To .SelectedItems.Count

then I hit continue and it stops some 8 lines later:

'Open workbooks
Funds_Ops = "\\sandprdob01\StdReg\Outbound_Escheat\Escheat_Tru st_out.csv"
Workbooks.Open Filename:=Funds_Ops
FO = ActiveWorkbook.Name


And then again he
Workbooks.Open Filename:=Trust_Acct
TA = ActiveWorkbook.Name


Then it finishes the rest of the code. Am I missing some code here?

Thanks


----------------------------------------
Chris Freeman
IT Project Coordinator

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
code execution has been interupted - Excel 2003 David_W Excel Programming 2 January 19th 09 02:17 PM
Code Execution Has Been Interupted michael.beckinsale Excel Programming 0 November 10th 07 10:38 AM
Code has been interupted - error message Jeff Excel Discussion (Misc queries) 0 May 10th 07 03:23 PM
Macro 'Code execution has been interupted' error after print? Bluehair the Pirate Excel Programming 1 February 9th 06 06:19 PM
Code Execution has been interupted Rich Excel Discussion (Misc queries) 2 May 10th 05 12:52 PM


All times are GMT +1. The time now is 04:28 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"