![]() |
AddName - issues w/ creating with reference to a diffferent workbook.
trying to create a named range for use as validation list in a cell drop
down the range is in a different workbook ....can't even get the basics right -UGH! Private Sub Workbook_Open() Const ProjectDataFile = "Job Nos for Timesheets.xls" Const ProjectDataFilePath = "E:\" ActiveWorkbook.Names.Add Name:="ProjectNames", _ RefersToR1C1:="=workbooks(ProjectDataFilePath & ProjectDataFile).worksheets(Project List).range($F$2:$F500)" thanks in advance, mark |
AddName - issues w/ creating with reference to a diffferent workbook.
='[Mybooks.xls]Sheet1'!$A$1:$A$20
Data validation won't work with a closed workbook anyway. -- Regards, Tom Ogilvy "Mark J Kubicki" wrote in message ... trying to create a named range for use as validation list in a cell drop down the range is in a different workbook ...can't even get the basics right -UGH! Private Sub Workbook_Open() Const ProjectDataFile = "Job Nos for Timesheets.xls" Const ProjectDataFilePath = "E:\" ActiveWorkbook.Names.Add Name:="ProjectNames", _ RefersToR1C1:="=workbooks(ProjectDataFilePath & ProjectDataFile).worksheets(Project List).range($F$2:$F500)" thanks in advance, mark |
AddName - issues w/ creating with reference to a diffferent workbook.
not to worry, i do have the workbook opened (as hidden)
but how do i get the workbook name, as a variable, into the code... this is where all the troubles began! (also, i suspect that as long as the workbook is open, it's location (drive and path) are irrelevant? correct?) "Tom Ogilvy" wrote in message ... ='[Mybooks.xls]Sheet1'!$A$1:$A$20 Data validation won't work with a closed workbook anyway. -- Regards, Tom Ogilvy "Mark J Kubicki" wrote in message ... trying to create a named range for use as validation list in a cell drop down the range is in a different workbook ...can't even get the basics right -UGH! Private Sub Workbook_Open() Const ProjectDataFile = "Job Nos for Timesheets.xls" Const ProjectDataFilePath = "E:\" ActiveWorkbook.Names.Add Name:="ProjectNames", _ RefersToR1C1:="=workbooks(ProjectDataFilePath & ProjectDataFile).worksheets(Project List).range($F$2:$F500)" thanks in advance, mark |
AddName - issues w/ creating with reference to a diffferent workbook.
ActiveWorkbook.Names.Add Name:="ProjectNames", _
RefersToR1C1:="='[" & ProjectDataFile & "]" & ProjectList & _ "'!$F$2:$F500" I assume ProjectList was a variable, but if it is the actual name, just make it a variable and set it to ProjectList = "Project List" The path would not be needed. -- Regards, Tom Ogilvy "Mark J Kubicki" wrote in message ... trying to create a named range for use as validation list in a cell drop down the range is in a different workbook ...can't even get the basics right -UGH! Private Sub Workbook_Open() Const ProjectDataFile = "Job Nos for Timesheets.xls" Const ProjectDataFilePath = "E:\" ActiveWorkbook.Names.Add Name:="ProjectNames", _ RefersToR1C1:="=workbooks(ProjectDataFilePath & ProjectDataFile).worksheets(Project List).range($F$2:$F500)" thanks in advance, mark |
All times are GMT +1. The time now is 02:04 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com