{"id":2985,"date":"2018-09-05T09:07:09","date_gmt":"2018-09-05T09:07:09","guid":{"rendered":"http:\/\/officetuts.net\/excel\/?p=2985"},"modified":"2024-03-26T09:44:45","modified_gmt":"2024-03-26T09:44:45","slug":"activate-worksheet-by-using-vba","status":"publish","type":"post","link":"https:\/\/officetuts.net\/excel\/vba\/activate-worksheet-by-using-vba\/","title":{"rendered":"Activate Worksheet With VBA"},"content":{"rendered":"\n
There are a few ways you can use VBA code to select a worksheet. I\u2019ll show you three ways you can achieve this.<\/p>\n\n\n\n
Let\u2019s say that you have two sheets. The following code will switch from any sheet<\/a> to \u201cSheet1\u201d. If the sheet doesn\u2019t exist it returns an error.<\/p>\n\n\n\n In our example, we have the \u201cSheet2\u201d selected.<\/p>\n\n\n\n