Name field value

  • Thread starter Thread starter efi
  • Start date Start date
E

efi

Hi,
Hoe can I set a value from vb for a name I defined
(Insert>Name>Define).
 
If it is already defined

assume the name is MyNum

ThisWorkbook.Names("MyNum").RefersTo = "=10"

if by value you mean you want it to be associated with a range of cells

Worksheets("Sheet4").Range("B9:C23").Name = "MyRange"
msgbox Range("MyRange").Address(external:=True)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top