AnsweredAssumed Answered

vrf Excel and General VB question: CreateObject

Question asked by VRFuser on Oct 17, 1999
Dear Colleagues,

I am having difficulty understanding how to properly use the Createobjet()
function with excel.  I understand in the examples that to create a Excel
worksheet I need to use the following command

CreateObject("Excel.Sheet");

My misunderstanding is how to interpret this in the Visual Basic Object
browser.  When I look for a class "Sheet" I can not find one.  I can only
find "SheetS" or "Worksheet". 

I was trying to use the following code to make a workbook and set up the
sheets as follows

Set myWB = CreateObject("Excel.workbook");
myWB.sheets("sheet1").select;
myWB.sheets("sheet1").name("frequency sweep 1");

....the rest is just adding sheets and renaming them.

I get an error that the object is not the right type

myWB is defined as a Library: Excel Class: Workbook.

Any thoughts on how to CreateObjects by understanding the Class structure?

Sincerely,
G. Matthew Kennedy
Field Engineer
Doble Engineering Company
Phone: 617-926-4900 x361
Fax: 617-926-0528
email: gmkennedy@doble.com


---------------------------------------------------------------------
This is the "vrf" maillist, managed by Majordomo.  To send messages to
this maillist, just email to "vrf@lvld.hp.com".  Subscriptions and
unsubscriptions are done through the address "vrf-request@lvld.hp.com".
If you need details, just send a message containing the text "help"
to "vrf-request@lvld.hp.com".
---------------------------------------------------------------------

Outcomes