I have a macro assigned to a commandbutton to open a specific worksheet base on the text value in cell "AI2" :
Sub ActivateSheet()
Sheets(Sheet2.Range("AI2").Text).Activate
End Sub
I don't know how to write vba to activate a hidden worksheet as I have 40 worksheets in the workbook and only want the dashboard and database worksheet open at all times. Then I need code to paste data from Column "A" in the last row of the database to cell "C12" of the activated worksheet, Column "B" to cell "C14", Column "C" to Cell "C16", etc. My worksheet tabs are named the same as the text value that is entered in cell "AI2". Any help would be appreciated.
Sub ActivateSheet()
Sheets(Sheet2.Range("AI2").Text).Activate
End Sub
I don't know how to write vba to activate a hidden worksheet as I have 40 worksheets in the workbook and only want the dashboard and database worksheet open at all times. Then I need code to paste data from Column "A" in the last row of the database to cell "C12" of the activated worksheet, Column "B" to cell "C14", Column "C" to Cell "C16", etc. My worksheet tabs are named the same as the text value that is entered in cell "AI2". Any help would be appreciated.