excel - Define a cell as a variable to be used in workbook reference -


i attempting define cell variable can use when calling upon workbook. cell changes daily , before running macro create brand new workbook cell title.

this have won't work:

dim wbk workbook  set wbk = "x:\myname\testocd\&"sheets("mockuphelp").range("d29")""" 

the cell referencing changes daily in sheet mockuphelp d29.

try,

set wbk = workbooks.open("x:\myname\testocd\" & sheets("mockuphelp").range("d29").value & ".xlsx") 

not sure if need .xlsx thrown on tail end should give general idea.


Comments

Popular posts from this blog

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -