Excel macro question - ref: sheets (hopefully a simple one!)

Trying to debug a macro in Excel and it has an odd line. Could someone explain it to me please.

"Sheets("comparative_report.pl reportNam").Select

As you can't have a question mark in the name of a sheet - what's this all about

Sorry if I'm being a bit thick but this is new to me.

Thanks

Damian



Answer this question

Excel macro question - ref: sheets (hopefully a simple one!)

  • SurreDeth

    It doesn't execute ok for me either. I am told that this used to work with Office 2000 but now doesn't with Office 2003. My belief is that along with this change of software there was a change of hardware and this perl script (if it is one) was lost in the process and so the macro no longer works.

    Damian


  • Prabhukalyan

    Coming back to this, the only thing I can think is that this is a Perl script but I have never seen this used before. Has anyone else. If it is where would the actual script file be

    Damian


  • AccentCare

    Hi, I thought it might be a single character wildcard but I've never seen it used that way either and when I tried it out there was an error. I've no idea what it could be, does the line execute ok if it does then what does it select if it doesn't then delete the line and never speak of it again.

  • Matteo Chiesi

    Hi again,

    I see what you mean by a perl script now, the script 'comparative_report.pl'

    I'm not 100% sure you can call perl scripts in VBA. Not that easily anyway. The call Sheets("comparative_report.pl reportNam").Select won't run the perl script, it's just treating it as a string name of a sheet.



  • Excel macro question - ref: sheets (hopefully a simple one!)