Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,824
Default MIssing References

Oops, I dropped the declarations:

Option explicit
Private oXL as Object
Private oWB as Object
Private oWS as Object
Sub testme()

On Error Resume Next
Set oXL = GetObject(, "Excel.Application")
If Err Then
Set oXL = CreateObject("Excel.Application")
End If

oXL.Visible = True
Set oWB = oXL.workbooks.Add(1)
Set oWS = oXL.activesheet

'do stuff

oWB.Close savechanges:=False
oXL.Quit

Set oWS = Nothing
Set oWB = Nothing
Set oXL = Nothing

End Sub

<<snipped
--

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
Missing VBA Project References for non-VBA commands Rock Chalk Julie Excel Discussion (Misc queries) 1 January 12th 07 06:11 PM
Missing References Steve Andrews Excel Programming 0 January 20th 04 03:26 PM
Bad or Missing References Bill B[_3_] Excel Programming 0 January 8th 04 01:29 PM
Missing References between Excel Versions Merkling, Steven Excel Programming 0 November 25th 03 02:40 PM
Missing Word 10 Object Error References Rajan Excel Programming 1 July 23rd 03 02:12 PM


All times are GMT +1. The time now is 11:36 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"