Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Multiple Spread sheets Via VBA
Message
From
25/11/1998 11:53:11
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
25/11/1998 11:21:48
Robert Byrd
National Association of Homebuilders
Washington, District of Columbia, United States
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00161402
Message ID:
00161426
Views:
19
>How can I create 10 or more sheets in one workbook?
Mr.Byrd,
Via oleautomation you could add new sheets :
oExcel = createobject("Excel.application")
with oExcel
   .visible = .t.
   .workbooks.add && Add a new workbook
   with .activeworkbook
     lnCurrentSheetCount = .sheets.count
     .sheets.add(,.sheets(lnCurrentSheetCount),15) && Add 15 new sheets after old ones
     for ix = lnCurrentSheetCount + 1 to .sheets.count
         .sheets.item(ix).name = "MyAddedSheet"+padl(ix-lnCurrentSheetCount,2,"0")
     endfor
   endwith
endwith
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform