montypython1
Technical User
Greetings,
What is the best way to reference a cell in a worksheet from within an Excel Macro?
Specifically, I need my Excel Macro to pull the value from cell "B9" from within the "Admin" worksheet. I have tried using the following, but this generates an error:
lcFileNameDataGL = Admin!B9
This formula works if I am referencing a cell from within another cell, but it does not work within the Macro.
I should mention that this Macro works perfectly. And I realize that I could easily edit the Macro, but since this Excel workbook will be used by non-techy people, I need them to be able to change the folder location within a worksheet (I do NOT want them messing around with the Macro).
Any ideas?
Thanks,
Dave
What is the best way to reference a cell in a worksheet from within an Excel Macro?
Specifically, I need my Excel Macro to pull the value from cell "B9" from within the "Admin" worksheet. I have tried using the following, but this generates an error:
lcFileNameDataGL = Admin!B9
This formula works if I am referencing a cell from within another cell, but it does not work within the Macro.
I should mention that this Macro works perfectly. And I realize that I could easily edit the Macro, but since this Excel workbook will be used by non-techy people, I need them to be able to change the folder location within a worksheet (I do NOT want them messing around with the Macro).
Any ideas?
Thanks,
Dave