Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy one spreadsheet into another without activating second spreadsheet's user form

I have a workbook that I open automatically with a user form
(frmQuery)showing.
Upon opening the workbook in the initialization event, I have a second
workbook open in order to copy information from one to the other and
then close the second workbook. The second workbook also opens
automatically with a user form (frmSurvey).

The problem I have is I don't want the second workbook form
(frmSurvey) to show during the copy process. I can't seem to get it
to not show. I have tried the UNLOAD and the HIDE methods, neither of
which works.

Any suggestions?

PAM
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Copy one spreadsheet into another without activating second spreadsheet's user form

Try checking if the first file is already open, then YOU
don't do the workbook_open event

like this
on error resume next
dim nms as string
nms=""
nms=workbooks("MyfirstFile.xls").name
if nms="" then
' This section is for your actual code on
' the Workbook_open event
end if


Francisco Mariscal
fcomariscal at hotmail dot com

-----Original Message-----
I have a workbook that I open automatically with a user

form
(frmQuery)showing.
Upon opening the workbook in the initialization event, I

have a second
workbook open in order to copy information from one to

the other and
then close the second workbook. The second workbook also

opens
automatically with a user form (frmSurvey).

The problem I have is I don't want the second workbook

form
(frmSurvey) to show during the copy process. I can't

seem to get it
to not show. I have tried the UNLOAD and the HIDE

methods, neither of
which works.

Any suggestions?

PAM
.

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Copy one spreadsheet into another without activating second spreadsheet's user form

Pamela,

The Application.Enableevents property migth do the trick. In your module
that's opening the second workbook try this:

Application.EnableEvents = False
Workbooks.Open "test1.xls"
Application.EnableEvents = True

However, this will disable all workbook_open events, so if you have others
that you do want to run this won't work.

hth

Doug


"P Cheek" wrote in message
om...
I have a workbook that I open automatically with a user form
(frmQuery)showing.
Upon opening the workbook in the initialization event, I have a second
workbook open in order to copy information from one to the other and
then close the second workbook. The second workbook also opens
automatically with a user form (frmSurvey).

The problem I have is I don't want the second workbook form
(frmSurvey) to show during the copy process. I can't seem to get it
to not show. I have tried the UNLOAD and the HIDE methods, neither of
which works.

Any suggestions?

PAM



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 20
Default Copy one spreadsheet into another without activating second spreadsheet's user form

Are you opening the workbook with frmSurvey manually, or through code? If
it's through code, have you tried disabling events (i.e.
application.enableevents = false) before you begin the process that causes
frmSurvey to display? Or even by copying from the second workbook without
making it active?

Not being able to close it may be because of your forms' modality -
whichever form is 'topmost' has the focus, and you can't close a form that's
not the topmost, unless all your forms are modeless (because you can't mix
modal & modeless forms)

HTH.


"P Cheek" wrote in message
om...
I have a workbook that I open automatically with a user form
(frmQuery)showing.
Upon opening the workbook in the initialization event, I have a second
workbook open in order to copy information from one to the other and
then close the second workbook. The second workbook also opens
automatically with a user form (frmSurvey).

The problem I have is I don't want the second workbook form
(frmSurvey) to show during the copy process. I can't seem to get it
to not show. I have tried the UNLOAD and the HIDE methods, neither of
which works.

Any suggestions?

PAM



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
Embedding spreadsheet in a user form GeorgeJ Excel Discussion (Misc queries) 3 July 24th 07 07:20 PM
How do I fill a cell in a user form from a selection on same form? Terry Tipsy Excel Discussion (Misc queries) 4 June 11th 07 02:59 PM
Put "put user form" in spreadsheet Keith New Users to Excel 3 April 8th 07 07:00 PM
User form and hiding spreadsheet Chip Smith Excel Discussion (Misc queries) 0 March 29th 06 07:46 PM
Why is my Excel spreadsheet's sorting not being remembered? LisaSellsBabyCloths Excel Discussion (Misc queries) 0 July 2nd 05 09:29 PM


All times are GMT +1. The time now is 03:04 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"