What is the syntax to access the right-most sheet?

Worksheets(Worksheets.Count)
'example
Worksheets(Worksheets.Count).Range("A1:A4") = "hello"
Worksheets(Worksheets.Count).Range("D1") = "world"
Worksheets(Worksheets.Count).Cells(2, 4).Value = "goodbye"
Advertisements

Where can I access VBA?

All versions of Excel automatically hides access to VBA tools. To access it, follow the steps below:

  1. File (located in top Ribbon) > Options (located in left navigation bar) > Customize Ribbon (listed on left-hand side) > Check box the “Developer tab” > Click OK
  2. Go to the Developer tab; listed on the very left of the ribbon pane, you will see an icon labeled Visual Basic.

Capture

Capture2

Capture3.JPG

Capture4