LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Make name assigned to newly added worksheet persist when file save

This VB6 code code to assign "DupsList" as name to new worksheet appears to
work during execution. But after the run, when I bring up the new worksheet
in Excel, the name is still "Sheet1". It forgot my name assignment. Thanks
for kind assistance.
sXLSSpec = "C:\Documents and Settings\CQA\My documents\" & _
"DuplicatesList.xls"
On Error Resume Next
Kill sXLSSpec
On Error GoTo 0
Set xlApp = New Excel.Application
xlApp.Workbooks.Add
Set myBook = xlApp.Workbooks(1)
'xlApp.myBook.Worksheets.Add
Set mySheet = myBook.Sheets(1)
myBook.Sheets(1).Name = "DupsLIst"
--
Lamont Phemister
 
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
automatically appending newly added data on worksheet to a master list worksheet tabylee via OfficeKB.com Links and Linking in Excel 0 December 17th 09 04:24 PM
Naming a newly added sheet Chip Pearson Excel Programming 0 August 20th 04 03:26 PM
Naming a newly added sheet Frank Kabel Excel Programming 0 August 20th 04 03:25 PM
Neet to get range of newly added QueryTable Tom Ogilvy Excel Programming 1 January 27th 04 09:44 PM
Add Hyperlink to newly added worksheet? onliner Excel Programming 3 August 13th 03 02:04 AM


All times are GMT +1. The time now is 11:05 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"