0

Say the current Excel workbook active sheet is named "MainSheet" and I want to insert a button at this sheet that will open a file that is at another sheet called "AuxiliarySheet".

This code works fine:

Sheets("AuxiliarySheet").Select
ActiveSheet.Shapes.Range(Array("Name of my file")).Select
Selection.Verb Verb:=xlPrimary

But I want to open the file without having to go to the "AuxiliarySheer", so I tried to do this:

Sheets("AuxiliarySheet").Shapes.Range(Array("Name of my file")).Verb Verb:=xlPrimary

What gives me this error:

Run-time error '438':
Object doesn't support this property or method

So the question is, can I open the file without using code Sheets("AuxiliarySheet").Select?

BigBen
  • 46,229
  • 7
  • 24
  • 40
Danilo Setton
  • 601
  • 10
  • 20

0 Answers0