Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 25
Default Working with the forms in different workbooks...

Hello all,

I think its bit difficult to explain, but let me try.....

I have two xls files - Main.xls & Feature_Compare.xls
In each file I have a Public Function (in Module) named "showform"
which will initiate the Showing of the respective form.

My code is as follows.... This code is in the Form of Main.xls


'************************************************* ******

' IsFileOpen checks if the file is open or not....
If IsFileOpen(BaseFolder & "Feature_Compare.xls") Then
Workbooks("Feature_Compare.xls").Close False
End If

Me.Hide
Workbooks.Open BaseFolder & "Feature_Compare.xls"
ActiveWorkbook.Worksheets("Blank").Activate
Application.Run "Feature_Compare.xls!showform"
ThisWorkbook.Close False

'************************************************* ******

OBSERVATION:

the code, Application.Run "Feature_Compare.xls!showform", will show
the Form. But until that form is not closed, the last line,
"ThisWorkbook.Close False", will not get executed.

When I close that Form, the Main.xls gets closed.


MY PROBLEM:

I have a similar code in the "Feature_Compare.xls" also.
So when I switch from "Feature_Compare.xls" to the "Main.xls", it will
make the form in the Main.xls to show. But the "Feature_Compare.xls"
is still open because it will be closed only when I close the form.

Because of this, When I try to go back to the form in
"Feature_Compare.xls", since the previous code was not fully complete,
this above code is not working properly.


If my explanation may not be fully understandable, please let me
know..

Any help will be really be appreciated....


Thanks
Joe
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
vlookup not working (active) - 2 workbooks goofy11 Excel Discussion (Misc queries) 2 January 16th 11 07:12 AM
Formuals not working in existing workbooks tom Excel Worksheet Functions 5 January 26th 07 09:51 PM
Working on Multiple Workbooks create_share Excel Discussion (Misc queries) 1 July 24th 06 12:25 PM
Working with Different workbooks eawinga Excel Discussion (Misc queries) 2 March 7th 05 02:06 PM
Working with Different workbooks eawinga Excel Discussion (Misc queries) 0 March 7th 05 09:59 AM


All times are GMT +1. The time now is 09:32 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"