home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.lang.visual.basic      MS Visual Basic discussions, NOT dot-net      10,840 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 9,356 of 10,840   
   Elef to All   
   Re: VBA and Excel - Workbook opening pro   
   27 Mar 05 21:51:01   
   
   From: m.p.b@*toglimi*rocketmail.com   
      
   Are you aware of the following constraint when building functions to be   
   called from a worksheet formula (User Defined Functions) ?:   
      
   A function used in a formula can return a value. It cannot make any changes   
   to the workbook.   
      
   Hope it helps.   
   Bye   
   Elef   
      
   "Peter"  ha scritto nel messaggio   
   news:chy1e.14216$XH5.11163@fe1.news.blueyonder.co.uk...   
   > If I have workbook "one.xls" open and try to open a second workbook from   
   > within a subroutine using   
   >   
   > Workbooks.Open "E:\Data\Excel\Two.xls"   
   >   
   > "Two.xls" opens as expected.   
   >   
   > but if I place the same line of code in a Function rather than a   
   > subroutine "Two.xls" does not open!   
   >   
   > Any ideas?  All I'm trying to do is to extract some data from one sheet &   
   > copy it to another.   
   >   
   >   
   > --   
   > Peter   
   > To err is human but it takes a computer to really mess things up!   
   >   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca