![]() |
Please Help with a macro.
Here is the code
DataUpdater Macro ' datayear = ActiveSheet.Range("$M$3") Quarter = ActiveSheet.Range("$P$3") QuarterAbev = ActiveSheet.Range("$U$3") Performance = ActiveSheet.Range("$Y$3") Companyname = "='S:\Documents\Data\" & datayear & "\Quarter " Quarter & ", " & datayear & "\[CRBM " & QuarterAbev & " Data Entry For - CompanyA.xls]" & Performance I would like to have a name defined in excel that refers to th variable companyname. THe formula below is what I tried and obviously it didnt work. ActiveWorkbook.Names.Add Name:="CompanyData", = companyname Please help me out. Thank you all in advance -- Message posted from http://www.ExcelForum.com |
Please Help with a macro.
TwEaKFrEaK
I think you need RefersTo:= for example: Companyname = "test" ActiveWorkbook.Names.Add Name:="CompanyData", RefersTo:=Companyname Regards Trevor "TwEaKFrEaK " wrote in message ... Here is the code DataUpdater Macro ' datayear = ActiveSheet.Range("$M$3") Quarter = ActiveSheet.Range("$P$3") QuarterAbev = ActiveSheet.Range("$U$3") Performance = ActiveSheet.Range("$Y$3") Companyname = "='S:\Documents\Data\" & datayear & "\Quarter " & Quarter & ", " & datayear & "\[CRBM " & QuarterAbev & " Data Entry Form - CompanyA.xls]" & Performance I would like to have a name defined in excel that refers to the variable companyname. THe formula below is what I tried and obviously it didnt work. ActiveWorkbook.Names.Add Name:="CompanyData", = companyname Please help me out. Thank you all in advance. --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 06:03 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com