Adding the contents of a string variable as a named range

  • Thread starter ragtopcaddy via AccessMonster.com
  • Start date
R

ragtopcaddy via AccessMonster.com

How do I implement the following where rngName is a string variable?:

WkBk.Names.Add Name:=rngName, RefersToR1C1:="=" & wkshtName & "!" &
ActiveCell.CurrentRegion.Address

As it is, I get the msg, "Run-Time Error '1004'" "The formula you typed
contains an error"

Thanks,
 
Top