I am running into a minor inconvience and I am sure that there is a simple fix to is.
I am running a userform from a workbook that will most likely be left open for extended periods of time. If the userform is left open and the user switches to a different workbook the form errors because it may be looking for a sheet that does not exits.
I use the following code to define the sheet but how can I specify workbook that it is to look in?
I am running a userform from a workbook that will most likely be left open for extended periods of time. If the userform is left open and the user switches to a different workbook the form errors because it may be looking for a sheet that does not exits.
I use the following code to define the sheet but how can I specify workbook that it is to look in?
Code:
Set ws = Worksheets("Training Data")