VBA Command Lines Being Skipped in Excel 2007

P-ster

New Member
Joined
Apr 10, 2009
Messages
1
I have a particular excel macro-enabled tool that has been in place for approximately 9 months working very well. The files are stored on the company shared drive, with users accessing via read-only files. Everyone using the tool has been running Excel 2003 until this past week. After the upgrade, I have seen several errors occuring that make it appear that certain lines of code are being ignored. Most often, it is a command to close an open workbook. I started with "ActiveWorkbook.Close", then tried "Workbooks("the name.ext").Close" but neither seems foolproof. Nor does the error happen consistently.

I have also seen instances where the command is an "Exit Sub" command within an IF statement. We confirmed that the IF statement was working as we were receiving a pop-up message, but even with the EXIT IF right after the message box, code after the IF statement was performed.

Does anyone know of anything that would cause 2007 to skip lines of code?

Thanks,

Andy
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK

Forum statistics

Threads
1,214,979
Messages
6,122,551
Members
449,088
Latest member
davidcom

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