Selecting the 'Active Sheet'

  • Thread starter Thread starter melvin
  • Start date Start date
M

melvin

Hi,

I need to select the 'Active Sheet' while I run a macro. If I do thi
by simply clicking the sheet it selects it by name (e.g
'Sheets("Sheet1").Select'). I have tried using the following comman
in vBasic but it isn't working; 'Sheets(ActiveSheet).Select'.

I am aiming to copy the macro over to other workbooks, which is why
am looking for a suitable command.

If anyone knows the command for selecting the active sheet in Excel fo
renaming purposes I would be extremely grateful if you could share i
with me!

Best regards,

Stuar
 
Don't understand your question fully. I think you misunderstand the
situation.
By definition the active sheet has at least one selected cell. This
then becomes the ActiveSheet Object which has the same properties as
Worksheet. No need to use Select.

You probably want something like :-
ActiveSheet.Name ="MyName" or
n = ActiveSheet.Name
 
Back
Top