Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 16
Default Sheet code name

How do I refer to a sheet by it's code name? I have to sheets in a workbook
that data is written to, and want to add the date to the tab name. In the
project explorer the names are refered to as Sheet1, Sheet2,.... The code
below fails when trying to substitute the names in the explorer window.

'Sheets(Array("Open Items", "Requires verification")).Select
Sheets(Array(Sheet1, Sheet2)).Select
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Sheet code name

With ActiveWorkbook.VBProject.VBComponents
Sheets(Array(CStr(.Item("Sheet1").Properties("Name ")), _
CStr(.Item("Sheet2").Properties("Name")), _
CStr(.Item("Sheet3").Properties("Name")))).Select
End With


--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Harley" wrote in message
...
How do I refer to a sheet by it's code name? I have to sheets in a

workbook
that data is written to, and want to add the date to the tab name. In the
project explorer the names are refered to as Sheet1, Sheet2,.... The code
below fails when trying to substitute the names in the explorer window.

'Sheets(Array("Open Items", "Requires verification")).Select
Sheets(Array(Sheet1, Sheet2)).Select



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
Sheet Name Changes how do i code for that Sonic Excel Worksheet Functions 0 July 10th 07 08:58 PM
VB code to copy sheet format to another sheet ASU Excel Discussion (Misc queries) 12 August 10th 06 02:37 AM
Sheet Code Module: copying code to [email protected][_2_] Excel Programming 2 December 14th 04 01:57 AM
excel - macro code to open a protected sheet, enter passowrd, and then protect sheet arunjoshi[_5_] Excel Programming 1 May 2nd 04 03:50 PM
unprotect sheet in code and make sheet visible peach255 Excel Programming 1 August 1st 03 03:28 AM


All times are GMT +1. The time now is 03:16 AM.

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"