Get Active Sheet Name

excel

#1

Hello,

please, would it be possible to get the active / current sheet name? I certainly don’t want all the sheet names, nor can I make a list of them, as they can change. But for Write Cell I need to insert sheet name and that changes throughout the whole process, so all I need is the name of the one, which I currently see.

Please help.

Thank you


#2

You might investiate using an XLS macros to get the sheet name (macro, sheet name)

Or you might go the image-automation route: Find the images that correspond to a selected sheet, then scrape between them


#3

Let me suggest this idea. Choose Rename Sheet then copy the text.
So you could do this with a TypeInto key combination

For example,
TypeInto
"[k(alt)]hor[d(ctrl)]c[u(ctrl)]"
Get Text from Clipboard

Or I suppose if the sheets were in a consistent order or a naming convention that you can sort, then you could use the Workbook variable with wb.GetSheets and sort or filter the array down to the sheet that would be the most recent. (which is the method I would normally use)

Thanks.


#4

Macro may work but we wanted to avoid macros. Excel is very complex and it’s already complicated. Image-automation is not an option. We want the user to be able to add new sheets without the need to reprogram the robot. So if there was an action or expression which would give me a current sheet name, it would be a perfect solution, but I guess that’s too much to ask haha.

Thanks anyway :slight_smile:


#5

Hello!

Here’s some topics with the same question that you’re asking for:

Hope It Helps!

Regards,