amberdstjohn
New Member
- Joined
- May 6, 2024
- Messages
- 2
- Office Version
- 2011
- Platform
- Windows
Hi,
I have a VBA code that I am using that changes the tab name when a cell is updated. This works great when you type data into the cell, but I am mainly needing it to work with a formula. The formula is just a vlookup, and I tried using =(CELL("contents",$O$3), but that doesn't work either. Any tips on how to make the code work with a formula?
I have a VBA code that I am using that changes the tab name when a cell is updated. This works great when you type data into the cell, but I am mainly needing it to work with a formula. The formula is just a vlookup, and I tried using =(CELL("contents",$O$3), but that doesn't work either. Any tips on how to make the code work with a formula?
VBA Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Address(0, 0) = "A1" Then
Sh.Name = Sh.Range("A1").Value
End If
End Sub