Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Why Sheet1 is displayed in modules as sheet1

all other sheets are Sheets?
--
Jim at Eagle
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,298
Default Why Sheet1 is displayed in modules as sheet1

you can change this in the properties window
The (name) property, with the word 'name' in parentheses is the sheet
object name....eg change sheet1 to shMain.
You can use this in VBA code
shMain.Range("A1") = "Main Sheet"

The Name property - ie without the parentheses, is the name that appears on
the
sheet tab, and is the reference used in the Worksheets() collection
So for shMain set the Name property to 'Main'
Now these two code blocks are equivalent:

With shMain
.Range("A1") = "Using the object"
End With
With Worksheets("Main")
.Range("A2")="Using the indirect"
End With

HTH

"Jim at Eagle" wrote:

all other sheets are Sheets?
--
Jim at Eagle

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 83
Default Why Sheet1 is displayed in modules as sheet1

Yes, the display name is "Entry" but I program using Sheet1. In Project
Explorer it displays as Sheet1(Entry). When I code as Sheet1 and leave the
line it changes to sheet1. All other worksheets stay as Sheet2......
Question why am I losing proper case on sheet1 only?

"Patrick Molloy" wrote:

you can change this in the properties window
The (name) property, with the word 'name' in parentheses is the sheet
object name....eg change sheet1 to shMain.
You can use this in VBA code
shMain.Range("A1") = "Main Sheet"

The Name property - ie without the parentheses, is the name that appears on
the
sheet tab, and is the reference used in the Worksheets() collection
So for shMain set the Name property to 'Main'
Now these two code blocks are equivalent:

With shMain
.Range("A1") = "Using the object"
End With
With Worksheets("Main")
.Range("A2")="Using the indirect"
End With

HTH

"Jim at Eagle" wrote:

all other sheets are Sheets?
--
Jim at Eagle

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
sheet1 TJ Excel Discussion (Misc queries) 3 April 20th 09 05:45 PM
=[Book.xls]Sheet1!A1 and not c:\blah\=[Book.xls]Sheet1!A1 Gaijintendo Excel Discussion (Misc queries) 1 August 7th 08 09:29 AM
[=Sheet1!A1] - if i use Column A1 ('Sheet1') / A2 ('Sheet2') Lawrence C H Tan Excel Worksheet Functions 0 January 19th 07 08:29 PM
How to know whether sheet1 contains any data in it? kvenku[_31_] Excel Programming 6 August 9th 04 06:01 AM
Sheet1 object not Worksheets("Sheet1") onedaywhen Excel Programming 2 August 12th 03 12:38 PM


All times are GMT +1. The time now is 02:32 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"