Particle68
Technical User
Hi All,
I'm fairly new at VB programming in Excel. This site sounds like it's a bit more for the seasoned programmer, but I was wondering if anyone could help me out with the following or suggest a site for newbies.
I wrote some code that prompts the user to open a file (GetOpenFilename), however if the file is already opened a message box pops up warning the user that the file is open and asks the user to reopen the file. Clicking NO generates a bug error (Run-time error '1004': Method 'Open' of object 'Workbooks' failed.
Is there anyway of accessing or checking the return value, vbNo, so that I can incorporate into my code? Or, is there something I'm missing in the code that generates the error?
Cheers,
Rick
I'm fairly new at VB programming in Excel. This site sounds like it's a bit more for the seasoned programmer, but I was wondering if anyone could help me out with the following or suggest a site for newbies.
I wrote some code that prompts the user to open a file (GetOpenFilename), however if the file is already opened a message box pops up warning the user that the file is open and asks the user to reopen the file. Clicking NO generates a bug error (Run-time error '1004': Method 'Open' of object 'Workbooks' failed.
Is there anyway of accessing or checking the return value, vbNo, so that I can incorporate into my code? Or, is there something I'm missing in the code that generates the error?
Cheers,
Rick