Excel - Get current active sheet name

Hi all,

I need to get the current active sheet name when opening an excel file. This sheet name could be different for each workbook that is opened.

I tried using the excel application scope, assigning the output workbook… then assigning a str → wb.CurrentWorksheet.Name

however I am receiving the error: Assign: Object reference not set to an instance of an object.

I see a lot of questions on this, but no solution yet.


The following might help you.


1 Like

Thank you, works a charm!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.