Excel VBA - get worksheet name

N

nyc_guy

Is there a quick way to get the worksheet name? I am currently using
inputbox to enter the sheet name myself. I would rather have the cod
get it so I don't have to change the code when the name of the shee
changes
 
R

Ron de Bruin

Hi nyc_guy

You can use ActiveSheet in you code
ActiveSheet.PrintOut for example to print the ActiveSheet
 

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