Worksheets

Roses8

Active Member
Joined
Aug 4, 2005
Messages
348
Hi,

Is there a way of naming a sheet in a macro so t looks up the name in a cell.

e.g.
in a macro it will be sheet (front page.cellA1).select

As the sheet name will always change, I would like the user the sheet name for the macro to select.

Many thanks.
:)
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

Richard Schollar

MrExcel MVP
Joined
Apr 19, 2005
Messages
23,707
Hi

You can use the value input into a cell as the name of the sheet the macro selects thus:

Code:
WorkSheets(WorkSheets("Front Page").Range("A1").Value).Activate

Richard
 

Watch MrExcel Video

Forum statistics

Threads
1,133,466
Messages
5,658,945
Members
418,477
Latest member
coutinhoicaro

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top