Logo 
Search:

MS Office Forum

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds

Macros and Named cells

  Asked By: Bakir    Date: Dec 16    Category: MS Office    Views: 579
  

I am using macros, how can I reference named cell names to collect the
values?

Share: 

 

3 Answers Found

 
Answer #1    Answered By: Archie Parker     Answered On: Dec 16

Try this.

Sub Test()
x = Range("MyName")
MsgBox (x)
End Sub

 
Answer #2    Answered By: Hamdan Younis     Answered On: Dec 16

This one worked if the macro is in the same workbook. how would you
do it if the info is in a different workbook.

 
Answer #3    Answered By: Laaibah Malik     Answered On: Dec 16

Example:

Sub Test()
x = Range("Book2!MyCell")
MsgBox (x)
End Sub

 
Didn't find what you were looking for? Find more on Macros and Named cells Or get search suggestion and latest updates.




Tagged: