Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Wrong # arguments or invalid property assignment

Status
Not open for further replies.

willydude

Programmer
Oct 24, 2006
123
US
Wsheet is the activesheet name.
SalesPeople is the sheet that has the salespeople's names.

I want to name a cell on the active sheet (i.e Branch8) _
using the activesheet's name and the salespersons _
name from the worksheet "SalesPeople".
Example: "JoeBranch8"

None of the following work.
Code:
.Offset(0, 11).Name = Worksheets("SalesPeople").Range("B1").Value & " " & Wsheet

.Offset(0, 11).Name = Worksheets("SalesPeople").Range("B1").Value & "!" & Wsheet

.Offset(0, 11).Name = Worksheets("SalesPeople").Range("B1") & Wsheet
 
Perhaps this ?
.Offset(0, 11).Name = Worksheets("SalesPeople").Range("B1") & Wsheet.Name

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Invalid qualifier on wSheet. But I already have
Code:
Dim Wsheet as String
Wsheet = ActiveSheet.Name
Doesn't this handle any qualifying for the sheet name?

Also tried
Code:
& "!" & Wsheet.Name

 
What is the value of Worksheets("SalesPeople").Range("B1") ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
B1 is "Joe" w/o quotes
B2 is "Bob"
B9 is "HouseAccount"
B18 is "Joe AI
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top