View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Aria[_2_] Aria[_2_] is offline
external usenet poster
 
Posts: 34
Default Toggle Between 2 Windows

Please help. This command will open a file. But on the second time I
activate this command, it errors on me because the file is already open
(thus, I don't need the prompt for choosing a filename). How do you
switch to the file that's already open without the error message?

Dim file1 as string, wkbk as Workbook
file1 = Application.GetOpenFilename
Set wkbk = Workbooks.Open(File1)

Aria :)

*** Sent via Developersdex http://www.developersdex.com ***