!Excel/VB: why why why? 
Author Message
 !Excel/VB: why why why?

The snippet of code below writes some data into row A, cols 1-10.

The Excel workbook contains only one sheet which is empty.

After running the code, I open the workbook with excell BUT the workbook
is hidden and I first have to UNHIDE the damn thing. How do I fix it?

Any help will be most appreciated.

Franz

Private Sub Command3_Click()
  Dim appXLS As New Excel.Application
  Dim wbk As Excel.Workbook
  Dim wks As Worksheet

  Dim row As Long, col As Long, j As Long

  Set wbk = GetObject("c:\web\cgi-src\loader\vb_sample.xls")
  Set wks = wbk.Sheets(1)

  col = 1
  For row = 1 To 10
    wks.Cells(row, col).Value = row * 10
  Next

  wbk.Save

  MsgBox "Done"
  End
End Sub

--
_________________________________
Franz Dullaart  (021) 650 3053

http://www.*-*-*.com/
_________________________________
Snoepie oor sy inkleurboek:
  "Ek maak altyd die lug blou"



Sat, 13 Nov 1999 03:00:00 GMT  
 
 [ 1 post ] 

 Relevant Pages 

1. why why why why

2. Why why why why?

3. Why Why Why

4. ActiveX wont deploy to Win 2K - why, Why WHY

5. VB6 ListView: Why oh why oh why...

6. Why, Why, Why!!!!!!!!!!!

7. Why,Why,Why are javabeans completely ignored?

8. VB6 ListView: Why oh why oh why...

9. Why -- Oh Why !!!!!!!!

10. Why oh why doesn't this work?

11. DELPHI - why oh why Pascal?

12. Why Microsoft, why'd ya do it?

 

 
Powered by phpBB® Forum Software