View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
keepITcool keepITcool is offline
external usenet poster
 
Posts: 2,253
Default Worksheet name anomalies


You misinterpret the benefits of usgin CODEnames.
Users can rename sheets and move but they cannot rename the
CODEnames of the sheet without going into VBE.

it is good practice to reference the sheets you''re working with
via their CODEname. and dispense with the wks object variables.
or qualifiers like Thisworkbook.worksheets("My Fourth Sheet")

e.g.
sheet4.Range(x)

ofcourse for code clarity you could set the CODEname
to s't more descriptive.



--
keepITcool
| www.XLsupport.com | keepITcool chello nl | amsterdam


wrote in
roups.com

I would prefer to use the DELSHEET variable name rather than Sheet4 as
sheets can get moved around. When I deliberately type:
DELSHEET.TextBox1.Text = "something"
I get a method/data member error... so that doesn't work.