Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
How to end macro on inital active worksheet containing macro button that was clicked | Excel Programming | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |