How to choose a sheet in a workbook with the old Excel XLM ?

E

erfani

Hi,

I have an old XLM macro which runs just fine for my needs. The onl
thing I have not managed to do is to be able to select not just a
excel workbook but a given sheet of that workbook. Is there an
command or way of making it choose the proper sheet of the workboo
before executing itself ?

Any suggestion is welcome !

Cheers
Nade
 
E

E Oveson

I don't know that much about XLM, but this might be the method you're
looking for:

WORKBOOK.SELECT
Macro Sheets Only

Equivalent to selecting a sheet or group of sheets in the active workbook.
If you select a group of sheets, subsequent commands effect all the sheets
in the group.

Syntax

WORKBOOK.SELECT(name_array, active_name, replace)

Name_array is a horizontal array of text names of sheets you want to
select. If name_array is omitted, no sheets are selected.

Active_name is the name of a single sheet in the workbook that you want
to be the active sheet. If active_name is omitted, the first sheet in
name_array is made the active sheet.

Replace specifies whether the currently selected sheets or macro sheets
are to be replaced by name_array. If TRUE or omitted, then the current sheet
selection is replaced by name_array. If FALSE, then name_array will be
appended to the current sheet.

-Erik
 

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