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,698 of 10,840   
   Steve Gerrard to Otie   
   Re: GetObject and Excel - working with V   
   19 Oct 05 20:29:58   
   
   XPost: comp.lang.basic.visual   
   From: mynamehere@comcast.net   
      
   "Otie"  wrote in message   
   news:rLqdnVAkXPa8n8renZ2dnUVZ_sqdnZ2d@adelphia.com...   
   > Here's my solution, in case it helps anyone:   
   >   
   (snipped long code)   
      
   I think you can clean that up a little. Consider the line   
      
   >        Set MyXL = GetObject(, "Excel.Application")   
      
   If this does not return an error, then you have gotten hold of an active   
   instance of Excel. So   
      
   >        Call DetectExcel   
   > ...   
      
   >   Set mySheet = MyXL.Worksheets(active_sheet_name$)   
      
   is redundant - you already have the excel app.   
      
   Delete all that, and instead just put   
      
       Set mySheet = MyXL.Application.ActiveSheet   
      
   --- 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