VBS GetObject will not bind to saved workbooks
<p>I'm trying to write a script which will switch to a specific excel workbook and enter keys, however, the script will only run if the workbook which is being referenced is unsaved.</p>

<p>For example:</p>

<p>If I open a new excel workbook which creates a new workbook named "Book1"; the following works:</p>

<p>Set xl = GetObject("Book1").Application</p>

<p>If I run the above when the workbook has been saved, even if the name remains the same, the above results in the following error: (0x800401E4).</p>

<p>Is anyone aware of this being a problem, or can anyone point out what I'm doing wrong? I'd guess the error has something to do with the object name being different from the actual file name, so when excel creates the default workbook the code works because the name of the instance is "Book1" whereas the saved "Book1" is assigned another object name when saved?</p>