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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

using If then statement to identify workbook

Status
Not open for further replies.

vba317

Programmer
Mar 5, 2009
708
US
If I am in a workbook I need to assign a number to a variable. Using my current code I get a complile error. I am using the following code:

Code:
If wbCodeBook = "BasicMaterials" Then ALegLowV1 = 477
 



Hi,

Not much code. I assume thatwbCodeBook is a workbook object, but that just a wild guess. you need to do better...
Code:
If UCase(wbCodeBook[b].Name[/b]) = "BASICMATERIALS.XLS" Then ALegLowV1 = 477


Skip,
[glasses]Don't let the Diatribe...
talk you to death![tongue]

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
Skip,
Your right next time I will try and be more accurate. Thanks for your help.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top