Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie : How to rename Sheet1 to Myname

Status
Not open for further replies.

omr1119

Programmer
Joined
Oct 7, 2003
Messages
34
Location
PH
Hi,

How to Rename Sheet1 in Xls, change or re-name to NewSheet using Vfp6. What is the Syntax?

thanks in advance,
OMR:-)
 
I think this what you are looking for.


local oExcel, oSheet
oExcel = CreateObject("Excel.Application")
oExcel.Visible = .T.
oExcel.Workbooks.Add()

oExcel.Sheets("Sheet1").Select
oExcel.Sheets("Sheet1").Name = "MySheet"

Jim Osieczonek
Delta Business Group, LLC
 
Hi Jim,

It works.....
Thanks a lot :-)

OMR:-)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top