Path/File Access Error

bisel

Board Regular
Joined
Jan 4, 2010
Messages
223
Office Version
  1. 365
Platform
  1. Windows
My Excel workbook has several userforms and has grown fairly large. Occasionally, when I open the workbook I get a "Path/File Access Error" that upon debug always points to an object used in the VBA code of an userform that Excel believe is invalid. For example, a worksheet name or other object. I find that all of the VBA code is disabled and trying to use Excel's repair utility does not resolve this issue. Fortunately, I am able to recover from this as I make frequent saves and have only to open the last good instance.

To my question ...

This issue seems to be related to the userforms and I found this reference in Stack Overflow an interesting read ...

One of the respondents indicated that is not good practice to merely use the term userformname.Show or Unload userformname or Unload Me

Does anyone have a recommended method for opening and closing userforms? Should I be using xxxx.Show or Load xxx? Should I be using Unload Me or xxx.Hide? There appears to be several methods for opening and closing userforms and looking for a method that might reduce the Path/File access errors.

Thanks,

Steve
 

Excel Facts

When they said...
When they said you are going to "Excel at life", they meant you "will be doing Excel your whole life".

Forum statistics

Threads
1,215,063
Messages
6,122,935
Members
449,094
Latest member
teemeren

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