Windows.Activate question

  • Thread starter Thread starter Alastair MacFarlane
  • Start date Start date
A

Alastair MacFarlane

Dear All

I am having problems with the following line of code:

Windows(SheetName).Activate

Sometimes you see:
test1.xls or test1 in the Window list.

Sometimes Excel's list of files in the windows menu have
an .xls after them and sometimes they don't. I don't want
to start using left and len functions to check for this.
How can I ensure that all machines that use Excel have the
same descriptor in the Window File list. We all use the
same version of Excel 97 (SR2).

Alastair
 
You shouldn't need to check or care. Always use the extension and it should
always work.

Your use of Sheetname in your example is misleading as the argument to the
windows collection is the workbook name. Just to restate, if you always use
the workbook name with extension as the argument, it will always work. If
you just use the name without extension, then it will work only if the
settings specify to hide known extensions (in the windows folder options I
believe).
 
Tom

Thanks for the advice.

Alastair

-----Original Message-----
 

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

Back
Top