excel-problem 
Author Message
 excel-problem

Hi! I'm trying to open excel on the client trough this script from a
webpage! Everyting works almost fine. Just one major problem.
When the script has ended excel closes and thats not the way I
want it to be. Please tell me whats wrong in my script.

Here's the script:

sub go()
 dim xl
 dim arr(2)
 dim sheet

 set xl = createobject("excel.sheet")
 xl.Application.Visible = TRUE
 xl.activesheet.cells(1,1).value = "Datum"
 xl.activesheet.cells(1,2).value = "Arbetsbeskrivning"
 xl.activesheet.cells(1,3).value = "Konsult"
 xl.activesheet.cells(1,4).value = "K-Firma"
 xl.activesheet.cells(1,5).value = "Kund"

end sub

Jan Ohlson



Fri, 08 Mar 2002 03:00:00 GMT  
 excel-problem
Try to change the scope of your variables to public or something like that.
Excel will be alive as long as variable xl is in memory.


Quote:
> Hi! I'm trying to open excel on the client trough this script from a
> webpage! Everyting works almost fine. Just one major problem.
> When the script has ended excel closes and thats not the way I
> want it to be. Please tell me whats wrong in my script.

> Here's the script:

> sub go()
>  dim xl
>  dim arr(2)
>  dim sheet

>  set xl = createobject("excel.sheet")
>  xl.Application.Visible = TRUE
>  xl.activesheet.cells(1,1).value = "Datum"
>  xl.activesheet.cells(1,2).value = "Arbetsbeskrivning"
>  xl.activesheet.cells(1,3).value = "Konsult"
>  xl.activesheet.cells(1,4).value = "K-Firma"
>  xl.activesheet.cells(1,5).value = "Kund"

> end sub

> Jan Ohlson



Fri, 08 Mar 2002 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. VB and Excel problem - VB corrupts Excel environment

2. Linking to Excel Problems

3. Access to Excel problem...

4. Linking Word and Excel, problem saving

5. Excel - Problems adding new controls

6. Excel problem

7. word to excel problem

8. XP Word/Excel Problem

9. an EXCEL problem

10. Excel problems!!!!

11. Newbie Excel Problems

12. Excel problem

 

 
Powered by phpBB® Forum Software