May 4, 2009 #1 vba317 Programmer Joined Mar 5, 2009 Messages 708 Location 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
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
May 4, 2009 #2 S SkipVought Programmer Joined Dec 4, 2001 Messages 47,492 Location US 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, Don't let the Diatribe... talk you to death! Just traded in my old subtlety... for a NUANCE! Upvote 0 Downvote
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, Don't let the Diatribe... talk you to death! Just traded in my old subtlety... for a NUANCE!
May 4, 2009 Thread starter #3 vba317 Programmer Joined Mar 5, 2009 Messages 708 Location US Skip, Your right next time I will try and be more accurate. Thanks for your help. Upvote 0 Downvote