View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
grantj[_3_] grantj[_3_] is offline
external usenet poster
 
Posts: 1
Default Naming more than one active workbook


This is how I have it set-up (and doesn't work):

(The user begins in a workbook which is named something by the user.
do not know the name. I want to name it "Compass3")
Set Compass3 = ActiveWorkbook

(next the user willl open a new file of which I name it "Form7". Thi
works fine)
Application.FindFile
Set Form7 = ActiveWorkbook

(After performing some operations, the "Form7" workbook is closed.
This works fine)
Form7.Activate
Application.CutCopyMode = False
Form7.Close True

(now when I activate "Compass3". I get an error: Object Required)
Compass3.Activate

Any suggestions??

Jeff Standen Wrote:
That's not the case though. Once you have set an object variable i
works
until that object no longer exists. It doens't even have to be th
active
workbook - as long as it is a reference to a workbook. Making another
workbook active should not stop the variable from referring to th
original
workbook unless you reset it to the new one.

Jeff

"grantj" wrot
in
message ...

I know how to name an active workbook with the following command:
Set Form7 = ActiveWorkbook

In this case I named the active workbook "Form7" which permits me to
activate and interact with the workbook.

Is it possible to name more than one active workbook (with different
names) at the same time and be able to activate and interact wit

them?
Apparently the way I use the command, the most recent workbook i

the
active workbook and previous active workbooks that were given name

are
no longer valid.


--
grantj


------------------------------------------------------------------------
grantj's Profile:
http://www.excelforum.com/member.php...o&userid=35021
View this thread

http://www.excelforum.com/showthread...hreadid=548972


--
grant
-----------------------------------------------------------------------
grantj's Profile: http://www.excelforum.com/member.php...fo&userid=3502
View this thread: http://www.excelforum.com/showthread.php?threadid=54897