• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Reference address contained in cell for Macro

bnpdkh

Member
I have a worksheet and I want to use the address that is contained in the cell in a macro. The address may chage but the function of the macro will not. for example, in cell I8 of sheet1 in my "auto open" workbook there is an address :H:\Work Schedule\2015\Q1 Work Weeks\Work Week 1\WORK WEEK 1.xls". I would like the code below to open the workbook whose address is listed in the cell as this may change based on other factors. Right now I either have to write a macro for each address of manually go in and copy the address to the macro. Any help? have searched and come across lots of info on returning cell adress but not alot on using adress in cell.


Code:
Workbooks.Open Filename:="H:\Work Schedule\2015\Q1 Work Weeks\Work Week 1\WORK WEEK 1.xls".CODE]
 
Like this?
Code:
Workbooks.Open Filename:=Worksheets("Sheet1").Range("I8").Value
 
Back
Top