I need to check if another window is open - if not I am going to display a
dialog box letting them know to open the file (or possibly opening a browse
window for them to open it), and if so, just keep going
I need to check if another window is open - if not I am going to display a
dialog box letting them know to open the file (or possibly opening a browse
window for them to open it), and if so, just keep going
Just to confrim you want to know if another file is open? If it is not open
then why not just open it yourself, something like this...
dim wbk as workbook
on error resume next
set wbk = workbooks("MyBook.xls")
on error goto 0
is wbk is nothing then _
set wbk = workbooks.open("Mybook.xls")
--
HTH...
Jim Thomlinson
"jweasl" wrote:
> I need to check if another window is open - if not I am going to display a
> dialog box letting them know to open the file (or possibly opening a browse
> window for them to open it), and if so, just keep going
Ok, I tried modifying the code to give a msgbox saying "Open Quote System" if
the window is not found - but it says that if the window is found or not.
I guess I'm not sure of the exact wbk property - the file is a template
(Quote System.xlt), when opened the default is Quote System1 - but I set wbk
to Quote System1 and Quote System1.xls, it didn't work either time.
"Jim Thomlinson" wrote:
> Just to confrim you want to know if another file is open? If it is not open
> then why not just open it yourself, something like this...
>
> dim wbk as workbook
>
> on error resume next
> set wbk = workbooks("MyBook.xls")
> on error goto 0
> is wbk is nothing then _
> set wbk = workbooks.open("Mybook.xls")
>
> --
> HTH...
>
> Jim Thomlinson
>
>
> "jweasl" wrote:
>
> > I need to check if another window is open - if not I am going to display a
> > dialog box letting them know to open the file (or possibly opening a browse
> > window for them to open it), and if so, just keep going
This code doesn't work either
If Windows("Quote System1").Visible = True Then MsgBox "Visible" _
Else MsgBox "Not Visible"
If the window is open, it will give a msgbox saying "Visible", but if it's
not open it gives me an error - Subscript out of range.
"jweasl" wrote:
> Ok, I tried modifying the code to give a msgbox saying "Open Quote System" if
> the window is not found - but it says that if the window is found or not.
> I guess I'm not sure of the exact wbk property - the file is a template
> (Quote System.xlt), when opened the default is Quote System1 - but I set wbk
> to Quote System1 and Quote System1.xls, it didn't work either time.
>
> "Jim Thomlinson" wrote:
>
> > Just to confrim you want to know if another file is open? If it is not open
> > then why not just open it yourself, something like this...
> >
> > dim wbk as workbook
> >
> > on error resume next
> > set wbk = workbooks("MyBook.xls")
> > on error goto 0
> > is wbk is nothing then _
> > set wbk = workbooks.open("Mybook.xls")
> >
> > --
> > HTH...
> >
> > Jim Thomlinson
> >
> >
> > "jweasl" wrote:
> >
> > > I need to check if another window is open - if not I am going to display a
> > > dialog box letting them know to open the file (or possibly opening a browse
> > > window for them to open it), and if so, just keep going
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks