Fixed referencing to a workbook cell

  • hi everyone!


    First of all i must congratulate Dave and his admins for such a nice uprade.
    the new site has such a good look and feel abt it!
    a very good learning environment indeed! Congratulations!


    Now back to my little inquiry:


    how do you reference a solid path to a cell with the workbook name included?
    Such as: Workbooks("Excel1").range("A1").value ?


    thanks for the help!


    cheers
    xlite

    Cheers
    ___________
    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and Ozgrid.com[/st]

  • Hi Xlite,


    I think your query is not very clear.


    What do you mean by "how do you reference a solid path..."


    I thought you wanted... how do you reference to a cell in another worksheet as a formula ....
    If you want that... following is the code.... , else please clarify.

    Code
    ActiveCell.FormulaR1C1 = "=Sheet2!RC"


    HTH

    Thanks: ~Yogendra

  • hi guys,


    sorry not clear. the function i need is to reference a range with the workbook included.
    as i will be opening multiple workbooks at the same time, i wanna make sure that the workbook i want is the correct one.


    for example if i wanna know the value in my book1 cell A1
    i just type something like: workbooks("Book1.xls").range("A1").value
    then i can use a msgbox to display the value.
    i noticed something like that before but forgot exactly how to type the code


    hope this make sense


    thanks for the help!
    cheers
    xlite

    Cheers
    ___________
    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and Ozgrid.com[/st]

  • yeah!
    that's it thomach,


    i missed out on the sheet name


    thanks for your help!


    cheers
    xlite

    Cheers
    ___________
    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and Ozgrid.com[/st]

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!