Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default closing form w/ Maco

Here's my minor dilemma, hope you can help.
I have two workbooks. From workbook(1) I open WB(2)where
I'm going to copy a sheet and paste it to WB(1). My
problem is that I have a form that opens when the sheet is
activated.
I recorded a macro to do this but it stops when the form
opens (and continues when I close it). It's not a big deal
but I'd like a more seamless operation.

Any help is appreciated.
JeffP

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default closing form w/ Maco

Jeff,

Is this a UserForm? The macro has no control while a UserForm is open, one
exception when the form is shown modeless. Then the macro that showed it
will keep running, can end, and your original macro that opened the workbook
will regain control.

From your other post, I gather this form shows automatically when the sheet
is selected. Perhaps you can change the macro that shows the form so that
it shows it when a button is clicked instead.

Provide more info.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"jeffP" wrote in message
...
Here's my minor dilemma, hope you can help.
I have two workbooks. From workbook(1) I open WB(2)where
I'm going to copy a sheet and paste it to WB(1). My
problem is that I have a form that opens when the sheet is
activated.
I recorded a macro to do this but it stops when the form
opens (and continues when I close it). It's not a big deal
but I'd like a more seamless operation.

Any help is appreciated.
JeffP



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default closing form w/ Maco

Earl,
Actually, I have two separate problems w/ UserForms (are
there other kinds of forms?).
This form is in Book(1) and runs by this

Private Sub Workbook_Open()
frm_start.Show
End Sub

I'm using a macro in Book(2) to open Book(1) select a
sheet and copy some cells , go back to Book(2) paste and
then close Book(1). It works fine except when Book(1)
opens of course the userform shows and the macro pauses
until I close the form w/ a click. What I want is to put a
piece of code in my macro that , when it reaches Book(1)
and the form it says "frm_start.unshow" but , as I'm sure
you know, there is no "unshow". I still want the form to
open when someone opens the workbook , just not when I'm
importing!
BTW, please re-read my other post. It is a different
problem. THis is a userform that opens whenever the sheet
is opened and I want it to until the user gets sick of it.
Thanks for you help.
jeffP

-----Original Message-----
Jeff,

Is this a UserForm? The macro has no control while a

UserForm is open, one
exception when the form is shown modeless. Then the

macro that showed it
will keep running, can end, and your original macro that

opened the workbook
will regain control.

From your other post, I gather this form shows

automatically when the sheet
is selected. Perhaps you can change the macro that shows

the form so that
it shows it when a button is clicked instead.

Provide more info.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"jeffP" wrote in message
...
Here's my minor dilemma, hope you can help.
I have two workbooks. From workbook(1) I open WB(2)where
I'm going to copy a sheet and paste it to WB(1). My
problem is that I have a form that opens when the sheet

is
activated.
I recorded a macro to do this but it stops when the form
opens (and continues when I close it). It's not a big

deal
but I'd like a more seamless operation.

Any help is appreciated.
JeffP



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default closing form w/ Maco

Application.EnableEvents = False
workbooks.Open "C:\my data\Book1.xls"
Application.EnableEvents = True

will prevent the userform from showing. It is best to use the term
userform. Many people use the word form to refer to a rendition of a paper
form on a worksheet - it is not always clear what the situation is when
using just the term form.

--
regards,
Tom Ogilvy

"jeffP" wrote in message
...
Earl,
Actually, I have two separate problems w/ UserForms (are
there other kinds of forms?).
This form is in Book(1) and runs by this

Private Sub Workbook_Open()
frm_start.Show
End Sub

I'm using a macro in Book(2) to open Book(1) select a
sheet and copy some cells , go back to Book(2) paste and
then close Book(1). It works fine except when Book(1)
opens of course the userform shows and the macro pauses
until I close the form w/ a click. What I want is to put a
piece of code in my macro that , when it reaches Book(1)
and the form it says "frm_start.unshow" but , as I'm sure
you know, there is no "unshow". I still want the form to
open when someone opens the workbook , just not when I'm
importing!
BTW, please re-read my other post. It is a different
problem. THis is a userform that opens whenever the sheet
is opened and I want it to until the user gets sick of it.
Thanks for you help.
jeffP

-----Original Message-----
Jeff,

Is this a UserForm? The macro has no control while a

UserForm is open, one
exception when the form is shown modeless. Then the

macro that showed it
will keep running, can end, and your original macro that

opened the workbook
will regain control.

From your other post, I gather this form shows

automatically when the sheet
is selected. Perhaps you can change the macro that shows

the form so that
it shows it when a button is clicked instead.

Provide more info.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"jeffP" wrote in message
...
Here's my minor dilemma, hope you can help.
I have two workbooks. From workbook(1) I open WB(2)where
I'm going to copy a sheet and paste it to WB(1). My
problem is that I have a form that opens when the sheet

is
activated.
I recorded a macro to do this but it stops when the form
opens (and continues when I close it). It's not a big

deal
but I'd like a more seamless operation.

Any help is appreciated.
JeffP



.



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 57
Default closing form w/ Maco

Jeff,

Another possible solution, depending on what's in the workbook is to link to
it from Book 2. Book 1 doesn't even have to open for that. If you're
looking through a table, perhaps use with VLOOKUP.

--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"jeffP" wrote in message
...
Earl,
Actually, I have two separate problems w/ UserForms (are
there other kinds of forms?).
This form is in Book(1) and runs by this

Private Sub Workbook_Open()
frm_start.Show
End Sub

I'm using a macro in Book(2) to open Book(1) select a
sheet and copy some cells , go back to Book(2) paste and
then close Book(1). It works fine except when Book(1)
opens of course the userform shows and the macro pauses
until I close the form w/ a click. What I want is to put a
piece of code in my macro that , when it reaches Book(1)
and the form it says "frm_start.unshow" but , as I'm sure
you know, there is no "unshow". I still want the form to
open when someone opens the workbook , just not when I'm
importing!
BTW, please re-read my other post. It is a different
problem. THis is a userform that opens whenever the sheet
is opened and I want it to until the user gets sick of it.
Thanks for you help.
jeffP

-----Original Message-----
Jeff,

Is this a UserForm? The macro has no control while a

UserForm is open, one
exception when the form is shown modeless. Then the

macro that showed it
will keep running, can end, and your original macro that

opened the workbook
will regain control.

From your other post, I gather this form shows

automatically when the sheet
is selected. Perhaps you can change the macro that shows

the form so that
it shows it when a button is clicked instead.

Provide more info.
--
Earl Kiosterud
mvpearl omitthisword at verizon period net
-------------------------------------------

"jeffP" wrote in message
...
Here's my minor dilemma, hope you can help.
I have two workbooks. From workbook(1) I open WB(2)where
I'm going to copy a sheet and paste it to WB(1). My
problem is that I have a form that opens when the sheet

is
activated.
I recorded a macro to do this but it stops when the form
opens (and continues when I close it). It's not a big

deal
but I'd like a more seamless operation.

Any help is appreciated.
JeffP



.



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
Cant get a combo box to update without closing form justin Excel Discussion (Misc queries) 0 May 17th 06 09:06 PM
Closing a Form Mike Excel Discussion (Misc queries) 2 March 14th 06 01:09 PM
closing form semi permantly jeffP Excel Programming 2 June 21st 04 10:53 AM
need form to initialize without closing bruce forster Excel Programming 2 April 21st 04 11:57 PM
userform titlebar and closing form D.S.[_3_] Excel Programming 6 November 29th 03 06:26 PM


All times are GMT +1. The time now is 04:23 AM.

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"