Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Problem Naming Worksheet

I have a C# program accessing the Excel interop. No matter what I do,
I can't get the name of the active worksheet to change from "Sheet1".
Here's basically the code.

MSExcel.Application xlApp = null;
MSExcel._Workbook wkb = null;
MSExcel._Worksheet wks = null;
string sheetName = "Opportunites";

xlApp = new MSExcel.Application();
wkb = xlApp.Workbooks.Add(MSExcel.XlWBATemplate.xlWBATWo rksheet);
wks = (MSExcel._Worksheet) wkb.ActiveSheet;
wks.Name = sheetName;

Is there anything else I need to do?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Problem Naming Worksheet

I should have added that when I look at the worksheet name in the
debugger, it does appear as "Opportunities". However, when Excel is
made visible, the sheet name is still named "Sheet1".

wrote:
I have a C# program accessing the Excel interop. No matter what I do,
I can't get the name of the active worksheet to change from "Sheet1".
Here's basically the code.

MSExcel.Application xlApp = null;
MSExcel._Workbook wkb = null;
MSExcel._Worksheet wks = null;
string sheetName = "Opportunites";

xlApp = new MSExcel.Application();
wkb = xlApp.Workbooks.Add(MSExcel.XlWBATemplate.xlWBATWo rksheet);
wks = (MSExcel._Worksheet) wkb.ActiveSheet;
wks.Name = sheetName;

Is there anything else I need to do?


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
problem naming range BorisS Excel Worksheet Functions 4 May 29th 08 05:34 PM
Problem naming tab- Keep getting .xls] in front denise Excel Discussion (Misc queries) 2 December 12th 06 07:12 PM
Excell column naming PROBLEM, HELP PLEASE ANA Excel Discussion (Misc queries) 2 September 8th 05 03:50 AM
Naming a worksheet help? pauldaddyadams Excel Worksheet Functions 1 August 9th 05 10:46 AM


All times are GMT +1. The time now is 10:07 PM.

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"