Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10
Default 430 Class does not support automation

I have a module in my excel spreadsheet that has following code in it.

Sub GetPicture
Dim xlsheet as Excel.Worksheet
Set xlsheet = New Excel.Worksheet
....
....
Set xlsheet = nothing

End Sub

The objective is to create a new temporary worksheet within the Sub and
destroy it at the end of sub so that the other worksheets do not have to be
disutrbed. When I execute the first statement I get the following error.

Error num 430 Class does not support automation or does not support expected
interface.
I tried the statement Set xlsheet = CreateObject("Excel.Worksheet"), but
that fails too with the message "Acitvex object cannot create object"
Please help
-- M


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 53
Default 430 Class does not support automation

Srinivas,

Would something like

Sheets.Add
Application.ActiveSheet.Name = "Temp_Name_Wont_Be_Taken"
....
....
Sheets("Temp_Name_Wont_Be_Taken").Delete

work for your situation???

Add's a new sheet, renames it (so it can be reffered to later more
easily and allows other sheets to be worked with) then deletes it.

Dan E

"Srinivas Chundi" wrote in message ...
I have a module in my excel spreadsheet that has following code in it.

Sub GetPicture
Dim xlsheet as Excel.Worksheet
Set xlsheet = New Excel.Worksheet
...
...
Set xlsheet = nothing

End Sub

The objective is to create a new temporary worksheet within the Sub and
destroy it at the end of sub so that the other worksheets do not have to be
disutrbed. When I execute the first statement I get the following error.

Error num 430 Class does not support automation or does not support expected
interface.
I tried the statement Set xlsheet = CreateObject("Excel.Worksheet"), but
that fails too with the message "Acitvex object cannot create object"
Please help
-- M




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
getting support MOHAMMAD New Users to Excel 1 February 9th 09 07:38 AM
I need some support [email protected] Excel Discussion (Misc queries) 1 January 16th 08 11:04 PM
XML support Alain B Excel Discussion (Misc queries) 1 May 15th 06 03:27 PM
Run-time error '430' / Class doesn't support Automation Mike[_59_] Excel Programming 1 October 28th 03 08:57 AM
Class doesn't support Automation... Nathan Stevens Excel Programming 1 August 7th 03 02:08 PM


All times are GMT +1. The time now is 05:42 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"