output data on range

A

Arne Hegefors

hi! I have problem with writing test to a named range in a different
worksheet than i run the vba code from. I start the code suing a button on a
worksheet and then i want the output on another sheet. however i cannot
manage to get that right.

With Worksheets("Corr. matrix")
ThisWorkbook.Names.Add Name:="OutputCorrMatrix",
RefersTo:="=$a$2:$a$2", Visible:=True
Range("OutputCorrMatrix").Cells(10, 10) = "test"

it is the sheet Corr. matrix that i want the output on but i only manage to
get it on the "start" sheet. pls help me solve this! thanks alot!
 

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