Use defined names in VBA?

J

JRocket02

Hi all

Any way to have Excel generate links or dimension variables so that VBA can
use the defined names on the spreadsheet (menu: insert > name > define)? Or
is it best to just Dim all the same variable names in code to match the
defined names? Thanks!
 
F

Frank Kabel

Hi
try something like
dim rng as range
set rng=range("your_defined_name")
msgbox rng.address
 

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

Top