Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Personal workbook opens and messes up workbooks(i)

I am referring to workbooks by number (I open a workbook and then refer to
it as workbooks(2). Problem is that when I refer to it, it refers to an
invisible workbook that is opening (personal) without my volition. Can
anyone tell me hwat's going on?

Thanks in advance, kind regards, Mark


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Personal workbook opens and messes up workbooks(i)

I don't think I'd ever trust the index into the workbooks collection.

I'd use a variable (or two):

dim ActWkbk as workbook
dim otherWkbk as workbook

set actwkbk = activeworkbook
set otherwkbk = workbooks.open(filename:=.....)

....

then you can do anything you want by using that variable:

otherwkbk.save
otherwkbk.close savechanges:=false




Mark Stephens wrote:

I am referring to workbooks by number (I open a workbook and then refer to
it as workbooks(2). Problem is that when I refer to it, it refers to an
invisible workbook that is opening (personal) without my volition. Can
anyone tell me hwat's going on?

Thanks in advance, kind regards, Mark


--

Dave Peterson
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
Excel Opens Multiple personal.xls Andrew Excel Discussion (Misc queries) 0 April 26th 10 10:12 PM
Personal.xls opens when I launch Excel kenk Excel Discussion (Misc queries) 1 December 7th 05 03:18 PM
Clicking on Excel File Only Opens Personal.xls Al Franz New Users to Excel 5 August 31st 05 02:56 AM
When I open EXCEL my PERSONAL.XLS opens as well !! JE McGimpsey New Users to Excel 3 August 3rd 05 09:50 PM
Personal workbook opens when Excel opens SheriTingle Excel Discussion (Misc queries) 2 March 30th 05 12:22 AM


All times are GMT +1. The time now is 10:18 PM.

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

About Us

"It's about Microsoft Excel"