Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Your original code expects 'aWS' to be a string, ie the name of a worksheet
in the implicitly referenced Activeworkbook, though not necessarily the activesheet. If you've already set a reference to the activesheet, which is what you say aWS is, - aWS.Names.Add Name:="PlusMinusCount", RefersTo:="="&count In passing probably better not name variables same as key-names, such as 'count' Regards, Peter T "Barb Reinhardt" wrote in message ... aWS is the activesheet. Count is an integer variable that's defined earlier in the code. "Peter T" wrote: What's 'aWS' and 'count' Regards, Peter T "Barb Reinhardt" wrote in message ... Worksheets(aWS).Names.Add Name:="PlusMinusCount", RefersTo:="="&count Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is wrong with this code? | Excel Discussion (Misc queries) | |||
wrong code? | Excel Programming | |||
What's wrong with this code? | Excel Programming | |||
What's wrong with the code,pls hv a look | Excel Programming | |||
Code for naming worksheet name range?? | Excel Programming |