Excel VBA macro crashes at end of Sub after 365 update

Status
Not open for further replies.

cjw29209

New Member
Joined
Mar 28, 2023
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I have a complex Excel file with extensive macros written in VBA. It worked great up until the 2210 or 2211 Excel update around January 2023. The last time I know it worked was early December 2022. Now it only works on an older laptop where I have turned off updates. I have tried the file on multiple other computers with updated versions of excel, but it only works on the copy of excel that is not updating. I discovered this issue in early January 2023, and it has not been resolved with the several updates that have been released in 2023.
One of the Macro's seems to work except that at the end of the Sub Excel freezes for several minutes before I can use it again. Here is a sample code:
VBA Code:

VBA Code:
Sub checktrans()
' This macro checks transactions for proper code
Application.ScreenUpdating = False
'Application.Calculation = xlCalculationManual
Dim transcode As String
Dim r1 As Range
Sheets("TRANS").Select
Range("a6").Select
' Range("a1050").Select
' use above lines when you want to skip ahead.  A6is normal start point, but chenge when you don;t want to recheck.
Do While ActiveCell.Value > 0
ActiveCell.Offset(0, 1).Range("A1").Select
transcode = ActiveCell.Value
Sheets("Balance Sheet").Select
Range("b1:b500").Select
Set r1 = Selection.FIND(What:=transcode, LookAt:=xlWhole)
If r1 Is Nothing Then
Sheets("TRANS").Select
Application.ScreenUpdating = True
MsgBox transcode & " was not found.  Fix code and then try again!"
Exit Sub
End If
Sheets("TRANS").Select
ActiveCell.Offset(1, -1).Range("A1").Select
Loop
Application.ScreenUpdating = True
'Application.Calculation = xlCalculationAutomatic
MsgBox "All tranaction codes found.  Ready to process!"
End Sub
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
Duplicate to: VBA Excel Macro freezes after SUB

In future, please do not post the same question multiple times. Per Forum Rules (#12), posts of a duplicate nature will be locked or deleted.

In relation to your question here, I have closed this thread so please continue in the linked thread. If you do not receive a response, you can "bump" it by replying to it yourself, though we advise you to wait 24 hours before doing so, and not to bump a thread more than once a day.
 
Upvote 0
Status
Not open for further replies.

Forum statistics

Threads
1,214,813
Messages
6,121,705
Members
449,048
Latest member
81jamesacct

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
Back
Top