Show row and column headings in a specific worksheet with reference to a cell
Macro Title:
|
Row and Column Display Headings Option:
|
Worksheet Variable:
|
Parameters Worksheet Name:
enter the name of the worksheet which captures the name of the worksheet in which you want to show row and column headings |
Cell Reference:
enter the cell reference that contains the name of the worksheet in which you want to show the row and column headings |
Cell Reference Variable:
|
First Comment:
' |
Second Comment:
' |
Third Comment:
' |
Sub Show_Row_Column_Headings()
'declare a variable
Dim ws As Worksheet
Set ws = Worksheets("Parameters")
'cell A1 in the Parameters worksheet contains the name of the worksheet in which we want to show row and column headings
SheetName = ws.Range("A1")
'activate the worksheet and show row and column headings
Worksheets(SheetName).Activate
ActiveWindow.DisplayHeadings = True
End Sub