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
To my question ...
This issue seems to be related to the userforms and I found this reference in Stack Overflow an interesting read ...
What is the cause of the "path/file access error" error
The hard part of this error is that it does not occur all the time, but I think it is due to the userforms. The program works as it should most of the time, but eventually Error 1 pops out. After E...
stackoverflow.com
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