AnsweredAssumed Answered

vrf Excel ActiveX change sheet

Question asked by VRFuser on Jul 15, 2004
Try something like this...


Put this in a formula box
//---------------------------------------------------
set sheet = CreateObject("Excel.Sheet").worksheets(1);
set ExcelApp = sheet.Application;
sheet.Application.Visible = TRUE;
ExcelApp.DisplayAlerts =FALSE;
sheet.Application.Windows(1).Caption = "Anchors detected";
ExcelApp.Windows(1).WindowState = xlMaximized;

Put this in a formula box
//---------------------------------------------------
ExcelApp.Sheets("Sheet1").Select;
ExcelApp.Sheets("Sheet1").Name = "Some Friendly Name";
ExcelApp.Sheets("Some Friendly Name").Select;

ExcelApp.Sheets.Add;
ExcelApp.Sheets("Sheet2").Select;
ExcelApp.Sheets("Sheet2").Name = "Another Friendly Name";

ExcelApp.Sheets.Add;
ExcelApp.Sheets("Sheet3").Select;
ExcelApp.Sheets("Sheet3").Name = "Yet Another Friendly Name";

ExcelApp.Sheets("Some Friendly Name").Select

Jeff Davis
Lead Software Test Engineer
CDI Engineering Solutions Aerospace Technologies
Embedded Systems and Electronics
3137 E Elwood # 160
Phoenix, Arizona 85034
Phone: (602)431-4497 (x226)
Cell: (480)330-1431
Fax: (602)431-4435


> -----Original Message-----
> From: Adrian King [mailto:adrian.king@rsm.renesas.com]
> Sent: Friday, July 16, 2004 01:42 AM
> To: VRF
> Subject: [vrf] Excel ActiveX change sheet
>
>
> I'd like to know how to change sheets using excel and VEE.
> I'm using VEE
> Pro 6 and excel 97. When executing the Sheets.Add or Sheets.Select
> methods, VEE errors with something about cannot get variable...
> Sheets.Add works if I dont add any input arguements like
> before, after,
> etc.
>
> Thanks!
>
> Best regards,
>
> Adrian King
> Design Engineer
> IC Design and Marketing Section
> RSM Design Center (RSM-DC),
> Renesas Semiconductor (M) Sdn. Bhd.,
> Bayan Lepas Free Industrial Zone,
> 11900 Bayan Lepas,
> Penang, Malaysia.
> Tel: 604-6438121 ext 2635
> Fax: 604-6434190
> Email: adrian.king@rsm.renesas.com
> URL: http://www.rsm.renesas.com 
>

______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

---
You are currently subscribed to vrf as: rsb@soco.agilent.com
To subscribe send a blank email to "join-vrf@it.lists.it.agilent.com".
To unsubscribe send a blank email to "leave-vrf@it.lists.it.agilent.com".
To send messages to this mailing list,  email "vrf@agilent.com". 
If you need help with the mailing list send a message to "owner-vrf@it.lists.it.agilent.com".

Outcomes